Nativescript-angular: upgrade to rc4 error

Created on 22 Jul 2016  路  2Comments  路  Source: NativeScript/nativescript-angular

From:

    "tns-core-modules": ">=2.1.0 || >=2.1.0-2016",
    "nativescript-angular": "^0.2.0",
    "@angular/common": "2.0.0-rc.3",
    "@angular/compiler": "2.0.0-rc.3",
    "@angular/core": "2.0.0-rc.3",
    "@angular/http": "2.0.0-rc.3",
    "@angular/platform-browser": "2.0.0-rc.3",
    "@angular/platform-browser-dynamic": "2.0.0-rc.3",
    "@angular/platform-server": "2.0.0-rc.3",
    "@angular/router": "3.0.0-alpha.7",

To:

    "tns-core-modules": ">=2.1.0",
    "nativescript-angular": "^0.2.0",
    "@angular/common": "2.0.0-rc.4",
    "@angular/compiler": "2.0.0-rc.4",
    "@angular/core": "2.0.0-rc.4",
    "@angular/http": "2.0.0-rc.4",
    "@angular/platform-browser": "2.0.0-rc.4",
    "@angular/platform-browser-dynamic": "2.0.0-rc.4",
    "@angular/platform-server": "2.0.0-rc.4",
    "@angular/router": "3.0.0-beta.2",

removed platforms & node_modules

tns emulate ios

Error:

Jul 21 15:46:05[67136]: 1 0x42082c -[TNSRuntime executeModule:]
Jul 21 15:46:05[67136]: 2 0x5160b main
Jul 21 15:46:05[67136]: 3 0x3c9ca25 start
Jul 21 15:46:05[67136]: file:///app/tns_modules/nativescript-angular/router/ns-router.js:3:40: JS ERROR Error: Could not find module '@angular/router/common_router_providers'. Computed path '/Users//Library/Developer/CoreSimulator/Devices/C3EF9E34-AAD3-40AD-B15F-1D1382B079AC/data/Containers/Bundle/Application/6FF20A11-BD79-4784-A7D5-2FE33EEA7A3F/test.app/app/tns_modules/@angular/router/common_router_providers'.

/src/ is missing ? it should be '@angular/router/src/common_router_providers'

question

Most helpful comment

Hello @devna13

Currently, our stable release is working with rc.3
If you want to use rc.4 keep in mind that each release candidate from Angular is introducing a number of breaking changes so until we have adopted them in out release some unexpected behaviour can be expected.

However, if you want to experiment with rc4 you should also require the next release of tns-code-modules and nativescript-angular(not the latest stable). This can be achieved with the following command:

npm install tns-core-modules@next  nativescript-angular@next --save

OR you can modify your _package.json_ like this:

"nativescript-angular": "next",
"tns-core-modules": "next"

If you prefer the second option you should clean your project from platforms and node_modules folders and rebuild

All 2 comments

Hello @devna13

Currently, our stable release is working with rc.3
If you want to use rc.4 keep in mind that each release candidate from Angular is introducing a number of breaking changes so until we have adopted them in out release some unexpected behaviour can be expected.

However, if you want to experiment with rc4 you should also require the next release of tns-code-modules and nativescript-angular(not the latest stable). This can be achieved with the following command:

npm install tns-core-modules@next  nativescript-angular@next --save

OR you can modify your _package.json_ like this:

"nativescript-angular": "next",
"tns-core-modules": "next"

If you prefer the second option you should clean your project from platforms and node_modules folders and rebuild

Thanks @NickIliev. great answer.

Was this page helpful?
0 / 5 - 0 ratings