No, it doesnāt work.
This is my output console log:
ngc error: Error: Error at /Users/xxx/yyyy/gse_mobile/.tmp/app/app.module.ngfactory.ts:175:32: Module āā/Users/xxx/yyyy/gse_mobile/node_modules/angular2-jwt/angular2-jwtāā has no exported member āAUTH_PROVIDERSā.
Hi everybody. I have the same issue.
It works when i lanch app with āionic serveā. But when i try to build app it throw exception:
ngc error: Error: Error at /var/www/desk-mobile/.tmp/app/app.module.ngfactory.ts:174:32: Module 'ā/var/www//node_modules/angular2-jwt/angular2-jwt"ā has no exported member āAUTH_PROVIDERSā.
Error at /var/www//.tmp/app/app.module.ngfactory.ts:404:37: Module 'ā/var/www//node_modules/angular2-jwt/angular2-jwt"ā has no exported member āAUTH_PROVIDERSā.
Error at /var/www//.tmp/app/app.module.ngfactory.ts:405:84: Cannot use ānewā with an expression whose type lacks a call or construct signature.
at check (/var/www//node_modules/@angular/tsc-wrapped/src/tsc.js:31:15)
at Tsc.typeCheck (/var/www//node_modules/@angular/tsc-wrapped/src/tsc.js:86:9)
at /var/www/***/node_modules/@angular/tsc-wrapped/src/main.js:33:23
at process._tickCallback (internal/process/next_tick.js:103:7)
at Module.runMain (module.js:592:11)
at run (bootstrap_node.js:394:7)
at startup (bootstrap_node.js:149:9)
at bootstrap_node.js:509:3
I tried your config, but I have error when build for ios:
Module ā"/Users/marcosmarcelo/Documents/Lagear/ionic/leslie/node_modules/angular2-jwt/angular2-jwt"ā has no exported member āAUTH_PROVIDERSā.
Error at /Users/marcosmarcelo/Documents/Lagear/ionic/leslie/.tmp/app/app.module.ngfactory.ts:403:37: Module ā"/Users/marcosmarcelo/Documents/Lagear/ionic/leslie/node_modules/angular2-jwt/angular2-jwt"ā has no exported member āAUTH_PROVIDERSā.
So, /www/build/main.jsā doesnāt create.
No errors if run ionic serve.
My app.component.ts is:
import { NgModule } from ā@angular/coreā;
import { IonicApp, IonicModule } from āionic-angularā;
import { MyApp } from ā./app.componentā;
import { AboutPage } from āā¦/pages/about/aboutā;
import { ContactPage } from āā¦/pages/contact/contactā;
import { HomePage } from āā¦/pages/home/homeā;
import { TabsPage } from āā¦/pages/tabs/tabsā;
///JWT Config
import { AuthHttp, AuthConfig, AUTH_PROVIDERS } from āangular2-jwtā;
//// import { provideAuth } from āangular2-jwtā;
import { Http } from ā@angular/httpā;
import { AuthService } from āā¦/providers/authā;
export function getAuthHttp(http) {
return new AuthHttp(new AuthConfig({
noJwtError: true
}), http);
}
Iām using @cyberbobjr config and it made possible to use jwt.
For now, I just test in browser version.
Instead local: Storage = new Storage(LocalStorage), use constructor(local: Storage) {}
There is no need to initiate the variable (at least is working for me).
Sorry but his is not solving the problem for me. I still have error:
Error: Module /Users/hughred22/nodeapp/probook/Ionic2/Mybuild/youtubebbw-rc-testing/bbwworkbook/node_modules/angular2-jwt/angular2-jwt.js does not export AuthHttp (imported by /Users/hughred22/nodeapp/probook/Ionic2/Mybuild/youtubebbw-rc-testing/bbwworkbook/.tmp/app/app.module.js)