Open mattiLeBlanc opened 8 years ago
Same problem. My build is: Angular2 Typescript Webpack ui-router
A little late, but I had the same issue. For Error TS2305, seems that the ui-router version that is installed was beta.2, which is causing that issue. Check you package.json to see which version of ui-router you are using. You should remove ui-router and make sure that you are using the beta.3 version and that fixed it for me. Source: https://github.com/FountainJS/generator-fountain-webapp/issues/142
This issue is still present. However, currently the version of UIRouter installed is 1.0.0-beta4 and the errors are slightly different:
ERROR in ./src/app/routes.ts (17,14): error TS2339: Property 'urlRouterProvider' does not exist on type 'UIRouter'.
ERROR in ./src/app/index.ts (16,45): error TS2345: Argument of type '{ states: Ng2StateDeclaration[]; configClass: typeof MyUIRouterConfig; }' is not assignable to parameter of type 'RootModule'. Object literal may only specify known properties, and 'configClass' does not exist in type 'RootModule'.
ERROR in .//ui-router-ng2/lib/uiRouterNgModule.js Module not found: Error: Can't resolve '@angular/router/src/router_config_loader' in '/{local_path}/node_modules/ui-router-ng2/lib' @ .//ui-router-ng2/lib/uiRouterNgModule.js 6:0-66 @ .//ui-router-ng2/lib/index.js @ ./src/app/index.ts @ ./src/index.ts
Switching to 1.0.0-beta3 helps.
change this line from configClass: MyRootUIRouterConfig
to
"config: \<any>MyRootUIRouterConfig"
dont ask me why wouldnt compile until i did this and then it started working
will be fixed in https://github.com/FountainJS/generator-fountain-webapp/issues/201
I have just created the Hello World and landing page example and both trigger JS errors in console:
Also the 'npm run serve' just shows a 'loading...' screen on localhost:3000 Any idea what is going on?
I choose: Angular2 Typescript Browsersync ui-router