Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70432

Error: Can’t resolve all parameters for SocketRasp: (?)

$
0
0

@TheLLspectre wrote:

Hi !

I have this big error which stop me, in my project !

Error: Can’t resolve all parameters for SocketRasp: (?).
at syntaxError (http://localhost:8100/build/vendor.js:80840:34)
at CompileMetadataResolver._getDependenciesMetadata (http://localhost:8100/build/vendor.js:94915:35)
at CompileMetadataResolver._getTypeMetadata (http://localhost:8100/build/vendor.js:94783:26)
at CompileMetadataResolver._getInjectableMetadata (http://localhost:8100/build/vendor.js:94769:21)
at CompileMetadataResolver.getProviderMetadata (http://localhost:8100/build/vendor.js:95060:40)
at http://localhost:8100/build/vendor.js:94989:49
at Array.forEach ()
at CompileMetadataResolver._getProvidersMetadata (http://localhost:8100/build/vendor.js:94949:19)
at CompileMetadataResolver.getNgModuleMetadata (http://localhost:8100/build/vendor.js:94604:50)
at JitCompiler._loadModules (http://localhost:8100/build/vendor.js:105945:70)

This coming with this file:

import { NgModule, Injectable } from ‘@angular/core’;
import { Socket } from ‘ngx-socket-io’;
@Injectable()
export class SocketRasp extends Socket
{
ipAddress: String;
constructor(ipAddress: String)
{
super({ url: ‘http://’+ ipAddress + ‘:8080’, options: {} }); //Port can be placed in ipAddress, think to delete it, in that case
}
//getters
//setters
//methods
}

And sometime it said : No provider for String !

here you have the app.module.ts:

import { NgModule, ErrorHandler } from ‘@angular/core’;
import { IonicApp, IonicModule, IonicErrorHandler } from ‘ionic-angular’;
import { BrowserModule } from ‘@angular/platform-browser’;
import { MyApp } from ‘./app.component’;
import { HttpClientModule } from ‘@angular/common/http’;
import { SocketIoModule } from ‘ngx-socket-io’;
import { Socket } from ‘ngx-socket-io’;
//pages
import { HomePage } from ‘…/pages/home/home’;
import { viewerPage } from ‘…/pages/viewer/viewer’;
import { SocketRasp } from ‘…/assets/typescript/SocketRasp’;
@NgModule({
declarations: [
MyApp,
HomePage,
viewerPage
],
imports: [
IonicModule.forRoot(MyApp),
HttpClientModule,
BrowserModule,
SocketIoModule
],
bootstrap: [IonicApp],
entryComponents: [
MyApp,
HomePage,
viewerPage
],
providers: [{ provide: ErrorHandler, useClass: IonicErrorHandler },
SocketRasp]
//{ provide: “IP_ADDRESS”, useValue: “169.254.25.25” /your ip address/ },
})
export class AppModule {}

If you find a solution … I’ll take it :wink:

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70432

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>