Problem with new router
See original GitHub issueFrom @jahidshohel on July 7, 2016 19:50
My tns
version is 2.1.1
. My package.json looks like -
"dependencies": {
"@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",
"nativescript-angular": "0.2.0",
"tns-core-modules": "^2.1.0"
}
And my app.routes.ts looks like -
import {RouterConfig} from "@angular/router";
import {ActionBarPage} from "./pages/actionbar/actionbar.component";
import {LoginPage} from "./pages/login/login.component";
import {nsProvideRouter} from "nativescript-angular/router"
export const routes:RouterConfig = [
{path: "", component: ActionBarPage},
{path: "login", component: LoginPage}
];
export const APP_ROUTER_PROVIDERS = [nsProvideRouter(routes, {enableTracing: false})];
I am trying to upgrade to new @angular/router, but I get this error -
Unhandled Exception
java.lang.RuntimeException: Unable to create application com.tns.NativeScriptApplication: com.tns.NativeScriptException: Fail to load module: /data/data/org.nativescript.groceries/files/app/main.js
TypeError: router_1.nsProvideRouter is not a function File "<Unknown>, line:1, column 265
StackTrace:
Frame: function: ",file:'/data/data/org.nativescript.groceries/files/app/app.routes.js',line:9,column: 42
Frame: function: 'require', file:', line:1, column 266
Frame: function:',file:'/data/data/org.nativescript.groceries/files/app/main.js', line:4,column:20
Frame: function:'require',file:',line:1,column:266
This is happening only with me, I have asked others on the Slack channel, it is not happening with them. Also tns doctor
passed with all ok.
Which platform(s) does your issue occur on?
Android (iOS was giving some other error)
Please provide the following version numbers that your issue occurs with:
- CLI: 2.1.1
- Cross-platform modules: ` “tns-ios”: { “version”: “2.1.1” }, “tns-android”: { “version”: “2.1.1” }
Copied from original issue: NativeScript/NativeScript#2430
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
The most common Wi-Fi problems and how to fix them
Resetting your router can fix myriad issues, and an inability to connect is one of them. Press the Reset button on the back...
Read more >Wi-Fi problems? Here's how to diagnose your router issues
Wi-Fi problems? Here's how to diagnose your router issues · Size up the Wi-Fi problem · Find your Wi-Fi router's 802.11 version ·...
Read more >No Internet Connection? How to Troubleshoot Internet Issues
A lot of internet issues can be remedied quickly by simply restarting your modem and router. It's an easy fix that's always worth...
Read more >How can I fix a router that gives signal, but not internet? - iFixit
Restart/Reboot Router - turn off the modem & router & leave it off for 2 minutes. disconnect the power cable & Ethernet cable...
Read more >The router won't connect to the internet: 10 must-know tips
1. Check to see if your router's internet connection is active · 2. Try connecting with an Ethernet cable · 3. Troubleshoot the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@jahidshohel How did you resolve this ?
@vakrilov : Its resolved.