You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I use livesync and make a change to a .css (i.e. app.css) I get an error (see below).
When I edit a ts or html file, the error disappears and the css change is applied correctly.
Executing before-prepare hook from /Users/witalec/NS/Workshop/sample-Groceries/hooks/before-prepare/nativescript-dev-typescript.js
Project successfully prepared
Transferring project files...
Successfully transferred all project files.
Applying changes...
Successfully synced application org.nativescript.groceries on device 192.168.57.101:5555.
JS: Page loaded
JS: BOOTSTRAPPING...
JS: ROOT
JS: CREATE VIEW ROOT: Page
JS: NativeScriptRenderer.createElement: StackLayout parent: Page(1), Page
JS: NativeScriptRenderer.createElement: page-router-outlet parent: StackLayout(25), StackLayout
JS: Creating view container in:StackLayout(25)
JS: EXCEPTION: Error during instantiation of Router! (PageRouterOutlet -> Router).
JS: ORIGINAL EXCEPTION: Route config should contain exactly one "as" or "name" property.
JS: ORIGINAL STACKTRACE:
JS: Error: Route config should contain exactly one "as" or "name" property.
JS: at new BaseException (/data/data/org.nativescript.groceries/files/app/tns_modules/angular2/src/facade/exceptions.js:15:23)
JS: at Object.normalizeRouteConfig (/data/data/org.nativescript.groceries/files/app/tns_modules/angular2/src/router/route_config_nomalizer.js:29:15)
JS: at RouteRegistry.config (/data/data/org.nativescript.groceries/files/app/tns_modules/angular2/src/router/route_registry.js:66:43)
JS: at /data/data/org.nativescript.groceries/files/app/tns_modules/angular2/src/router/route_registry.js:108:72
JS: at Array.forEach (native)
JS: at RouteRegistry.configFromComponent (/data/data/org.nativescript.groceries/files/app/tns_modules/angular2/src/router/route_registry.js:108:31)
JS: at new RootRouter (/data/data/org.nativescript.groceries/files/app/tns_modules/angular2/src/router/router.js:423:23)
JS: at routerFactory (/data/data/org.nativescript.groceries/files/app/tns_modules/angular2/src/router/router_providers_common.js:23:22)
JS: at Injector._instantiate (/data/data/org.nativescript.groceries/files/app/tns_modules/angular2/src/core/di/injector.js:766:27)
JS: at Injector._instantiateProvider (/data/data/org.nativescript.groceries/files/app/tns_modules/angular2/src/core/di/injector.js:714:25)
JS: ERROR CONTEXT:
JS: [object Object]
JS: ERROR BOOTSTRAPPING ANGULAR
JS: EXCEPTION: Error during instantiation of Router! (PageRouterOutlet -> Router).
JS: ORIGINAL EXCEPTION: Route config should contain exactly one "as" or "name" property.
JS: ORIGINAL STACKTRACE:
JS: Error: Route config should contain exactly one "as" or "name" property.
JS: at new BaseException (/data/data/org.nativescript.groceries/files/app/tns_modules/angular2/src/facade/exceptions.js:15:23)
JS: at Object.normalizeRouteConfig (/data/data/org.nativescript.groceries/files/app/tns_modules/angular2/src/router/route_config_nomalizer.js:29:15)
JS: at RouteRegistry.config (/data/data/org.nativescript.groceries/files/app/tns_modules/angular2/src/router/route_registry.js:66:43)
JS: at /data/data/org.nativescript.groceries/files/app/tns_modules/angular2/src/router/route_registry.js:108:72
JS: at Array.forEach (native)
JS: at RouteRegistry.configFromComponent (/data/data/org.nativescript.groceries/files/app/tns_modules/angular2/src/router/route_registry.js:108:31)
JS: at new RootRouter (/data/data/org.nativescript.groceries/files/app/tns_modules/angular2/src/router/router.js:423:23)
JS: at routerFactory (/data/data/org.nativescript.groceries/files/app/tns_modules/angular2/src/router/router_providers_common.js:23:22)
JS: at Injector._instantiate (/data/data/org.nativescript.groceries/files/app/tns_modules/angular2/src/core/di/injector.js:766:27)
JS: at Injector._instantiateProvider (/data/data/org.nativescript.groceries/files/app/tns_modules/angular2/src/core/di/injector.js:714:25)
JS: ERROR CONTEXT:
JS: [object Object]
JS:
JS: undefined
The text was updated successfully, but these errors were encountered:
Page reloads triggered by CSS changes are not supported. I added a clumsy hack for the Groceries sample, but the real fix has to come from nativescript-cli.
When I use livesync and make a change to a .css (i.e. app.css) I get an error (see below).
When I edit a ts or html file, the error disappears and the css change is applied correctly.
I am using {N} 1.6.0
You can replicate the issue with: sample-groceries angular branch
project.
The text was updated successfully, but these errors were encountered: