-
-
Notifications
You must be signed in to change notification settings - Fork 239
Closed
Labels
Description
Environment
Provide version numbers for the following components (information can be retrieved by running tns info in your project folder or by inspecting the package.json of the project):
- CLI: 5.4.2
- Cross-platform modules: 5.4.3
- Android Runtime: 5.4.0
- iOS Runtime: 5.4.2
- Plugin(s):
{
"nativescript": {
"id": "org.nativescript.appNg54",
"tns-android": {
"version": "5.4.0"
},
"tns-ios": {
"version": "5.4.2"
}
},
"description": "NativeScript Application",
"license": "SEE LICENSE IN <your-license-filename>",
"repository": "<fill-your-repository-here>",
"dependencies": {
"@angular/animations": "~8.0.0",
"@angular/common": "~8.0.0",
"@angular/compiler": "~8.0.0",
"@angular/core": "~8.0.0",
"@angular/forms": "~8.0.0",
"@angular/http": "~8.0.0-beta.10",
"@angular/platform-browser": "~8.0.0",
"@angular/platform-browser-dynamic": "~8.0.0",
"@angular/router": "~8.0.0",
"nativescript-angular": "~8.0.0",
"nativescript-theme-core": "~1.0.4",
"reflect-metadata": "~0.1.12",
"rxjs": "~6.5.0",
"tns-core-modules": "~5.4.0",
"zone.js": "~0.9.1"
},
"devDependencies": {
"@angular/compiler-cli": "~8.0.0",
"@ngtools/webpack": "~8.0.0",
"nativescript": "^5.4.2",
"nativescript-dev-typescript": "~0.10.0",
"nativescript-dev-webpack": "~0.24.0"
},
"gitHead": "8c1a4866a66daab09bf5ef8e5a96472687192373",
"readme": "NativeScript Application"
}- NativeScript-Angular: 8.0.2
- Angular: 8
Describe the bug
When trying to build NativeScript application created with 5.4, the application suddenly failed to build. In package.json of the project, the nativescript-angular is referenced with ~8.0.0, which suddenly installed 8.0.2 of the package. After trying to build the application (with bundle workflow) an error occured:
tns build android:
ERROR in ../node_modules/nativescript-angular/element-registry.js
Module not found: Error: Can't resolve 'tns-core-modules/ui/bottom-navigation' in 'D:\Work\nativescript-cli\scratch\appNg54\node_modules\nativescript-angular'
@ ../node_modules/nativescript-angular/element-registry.js 142:57-105
@ ../node_modules/nativescript-angular/renderer.js
@ ../node_modules/nativescript-angular/nativescript.module.js
@ ./app/app.module.ts
@ ./main.ts
ERROR in ../node_modules/nativescript-angular/element-registry.js
Module not found: Error: Can't resolve 'tns-core-modules/ui/tab-navigation-base/tab-content-item' in 'D:\Work\nativescript-cli\scratch\appNg54\node_modules\nativescript-angular'
@ ../node_modules/nativescript-angular/element-registry.js 172:55-122
@ ../node_modules/nativescript-angular/renderer.js
@ ../node_modules/nativescript-angular/nativescript.module.js
@ ./app/app.module.ts
@ ./main.ts
ERROR in ../node_modules/nativescript-angular/element-registry.js
Module not found: Error: Can't resolve 'tns-core-modules/ui/tab-navigation-base/tab-strip' in 'D:\Work\nativescript-cli\scratch\appNg54\node_modules\nativescript-angular'
@ ../node_modules/nativescript-angular/element-registry.js 170:49-109
@ ../node_modules/nativescript-angular/renderer.js
@ ../node_modules/nativescript-angular/nativescript.module.js
@ ./app/app.module.ts
@ ./main.ts
ERROR in ../node_modules/nativescript-angular/element-registry.js
Module not found: Error: Can't resolve 'tns-core-modules/ui/tab-navigation-base/tab-strip-item' in 'D:\Work\nativescript-cli\scratch\appNg54\node_modules\nativescript-angular'
@ ../node_modules/nativescript-angular/element-registry.js 171:53-118
@ ../node_modules/nativescript-angular/renderer.js
@ ../node_modules/nativescript-angular/nativescript.module.js
@ ./app/app.module.ts
@ ./main.ts
ERROR in ../node_modules/nativescript-angular/element-registry.js
Module not found: Error: Can't resolve 'tns-core-modules/ui/tabs' in 'D:\Work\nativescript-cli\scratch\appNg54\node_modules\nativescript-angular'
@ ../node_modules/nativescript-angular/element-registry.js 173:45-80
@ ../node_modules/nativescript-angular/renderer.js
@ ../node_modules/nativescript-angular/nativescript.module.js
@ ./app/app.module.ts
@ ./main.ts
Webpack compilation complete.
Executing webpack failed with exit code 2.
To Reproduce
- Install nativescript CLI 5.4.x:
npm i -g nativescript@5.4 - Create new application with the currently installed CLI:
tns create myApp --ng - Try to build the application:
cd myApp && tns build android
The build will fail.
Expected behavior
Patch version of the package should not break existing applications.
Workaround:
Hardcode version 8.0.1 of nativescript-angular in the project's package.json:
npm i --save --save-exact nativescript-angular@8.0.1