We have an app that is based off the BottomNavigation template and I had it all working in Android. When we tried it on iOS we ran into conflicts with software and dependency versions so updated everything on both systems in order to align things.
Here is what we are using:
NativeScript: 8.1.5 Angular CLI: 13.0.3 Node: 16.13.1 Webpack: 5.0.4
I have run ns migrate. Here is the package.json:
"description": "Reports App | Mobile Expense Reports",
"license": "SEE LICENSE IN <your-license-filename>",
"readme": "NativeScript Application",
"repository": "<fill-your-repository-here>",
"scripts": {
"lint": "tslint \"app/**/*.ts\""
},
"dependencies": {
"@angular-devkit/build-angular": "^13.1.4",
"@angular/animations": "^12.2.5",
"@angular/common": "^12.2.5",
"@angular/compiler": "^12.2.5",
"@angular/core": "^13.1.3",
"@angular/forms": "^12.2.5",
"@angular/http": "8.0.0-beta.10",
"@angular/platform-browser": "^12.2.5",
"@angular/platform-browser-dynamic": "^12.2.5",
"@angular/router": "^12.2.5",
"@nativescript/angular": "^12.2.0",
"@nativescript/core": "~8.1.1",
"@nativescript/fingerprint-auth": "^8.0.0",
"nativescript-app-sync": "^1.0.6",
"nativescript-bottom-navigation": "^2.0.5",
"nativescript-camera": "^4.0.2",
"nativescript-drop-down": "^5.0.6",
"nativescript-fancyalert": "^3.0.9",
"nativescript-fingerprint-auth": "^7.0.2",
"nativescript-fontawesome": "^1.0.0",
"nativescript-gradient": "^2.0.1",
"nativescript-imagepicker": "^7.1.0",
"nativescript-iqkeyboardmanager": "^1.5.1",
"nativescript-modal-datetimepicker": "^1.1.4",
"nativescript-pdf-view": "^2.1.0",
"nativescript-theme-core": "~1.0.4",
"nativescript-toast": "^1.4.6",
"nativescript-ui-listview": "^8.2.0",
"reflect-metadata": "~0.1.10",
"ruby": "^0.6.1",
"rxjs": "~7.3.0",
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular/compiler-cli": "^12.2.15",
"@nativescript/android": "8.1.1",
"@nativescript/webpack": "^5.0.4",
"@ngtools/webpack": "^12.2.5",
"babel-traverse": "6.26.0",
"babel-types": "6.26.0",
"babylon": "6.18.0",
"codelyzer": "~4.5.0",
"extract-text-webpack-plugin": "~3.0.2",
"lazy": "1.0.11",
"sass": "~1.39.0",
"tslint": "~5.12.1",
"typescript": "~4.3.5",
"uglifyjs-webpack-plugin": "^1.1.2"
},
"main": "./app/main.ts"
}
When I run ns run android I am stuck on this:
Searching for devices...
Preparing project...
webpack is watching the files...
C:\Users\myApp\node_modules\@angular\compiler-cli\ngcc\src\entry_point_finder\targeted_entry_point_finder.js:40
throw new Error("The target entry-point \"" + invalidTarget.entryPoint.name + "\" has missing dependencies:\n" +
^
Error: The target entry-point "undefined" has missing dependencies:
- nativescript-angular/element-registry
at TargetedEntryPointFinder.findEntryPoints (C:\Users\myApp\node_modules\@angular\compiler-cli\ngcc\src\entry_point_finder\targeted_entry_point_finder.js:40:23)
at C:\Users\myApp\node_modules\@angular\compiler-cli\ngcc\src\execution\analyze_entry_points.js:29:41
at SingleProcessExecutorSync.SingleProcessorExecutorBase.doExecute (C:\Users\myApp\node_modules\@angular\compiler-cli\ngcc\src\execution\single_process_executor.js:28:29)
at C:\Users\myApp\node_modules\@angular\compiler-cli\ngcc\src\execution\single_process_executor.js:57:59
at SyncLocker.lock (C:\Users\myApp\node_modules\@angular\compiler-cli\ngcc\src\locking\sync_locker.js:34:24)
at SingleProcessExecutorSync.execute (C:\Users\myApp\node_modules\@angular\compiler-cli\ngcc\src\execution\single_process_executor.js:57:27)
at Object.mainNgcc (C:\Users\myApp\node_modules\@angular\compiler-cli\ngcc\src\main.js:74:25)
at Object.process (C:\Users\myApp\node_modules\@angular\compiler-cli\ngcc\index.js:29:23)
at NgccProcessor.processModule (C:\Users\myApp\node_modules\@ngtools\webpack\src\ngcc_processor.js:175:16)
at C:\Users\myApp\node_modules\@ngtools\webpack\src\ivy\host.js:146:18
at C:\Users\myApp\node_modules\@ngtools\webpack\src\ivy\host.js:76:24
at Array.map (<anonymous>)
at Object.host.resolveModuleNames (C:\Users\myApp\node_modules\@ngtools\webpack\src\ivy\host.js:74:32)
at actualResolveModuleNamesWorker (C:\Users\myApp\node_modules\typescript\lib\typescript.js:109497:133)
at resolveModuleNamesWorker (C:\Users\myApp\node_modules\typescript\lib\typescript.js:109760:26)
at resolveModuleNamesReusingOldState (C:\Users\myApp\node_modules\typescript\lib\typescript.js:109857:24)
Executing webpack failed with exit code 1.
I came across this post: Nativescript Error: Executing webpack failed with exit code 1
so I tried changing the webpack version to 5.0.0-rc.8 in package.json and got the following similar errors:
Searching for devices...
Preparing project...
webpack is watching the files...
Compiling @angular/common : module as esm2015
Compiling @angular/animations : module as esm2015
Compiling listview-directives : main as commonjs
Compiling @nativescript/angular/polyfills : module as esm2015
Compiling @angular/animations/browser : module as esm2015
Compiling @angular/platform-browser : module as esm2015
Compiling @angular/router : module as esm2015
Compiling @angular/forms : module as esm2015
Compiling @angular/common/http : module as esm2015
Compiling @angular/platform-browser/animations : module as esm2015
Compiling @angular/http : module as esm5
Compiling @nativescript/angular : module as esm2015
C:\Users\myApp\node_modules\@angular\compiler-cli\ngcc\src\entry_point_finder\targeted_entry_point_finder.js:40
throw new Error("The target entry-point \"" + invalidTarget.entryPoint.name + "\" has missing dependencies:\n" +
^
Error: The target entry-point "undefined" has missing dependencies:
- nativescript-angular/element-registry
at TargetedEntryPointFinder.findEntryPoints (C:\Users\myApp\node_modules\@angular\compiler-cli\ngcc\src\entry_point_finder\targeted_entry_point_finder.js:40:23)
at C:\Users\myApp\node_modules\@angular\compiler-cli\ngcc\src\execution\analyze_entry_points.js:29:41
at SingleProcessExecutorSync.SingleProcessorExecutorBase.doExecute (C:\Users\myApp\node_modules\@angular\compiler-cli\ngcc\src\execution\single_process_executor.js:28:29)
at C:\Users\myApp\node_modules\@angular\compiler-cli\ngcc\src\execution\single_process_executor.js:57:59
at SyncLocker.lock (C:\Users\myApp\node_modules\@angular\compiler-cli\ngcc\src\locking\sync_locker.js:34:24)
at SingleProcessExecutorSync.execute (C:\Users\myApp\node_modules\@angular\compiler-cli\ngcc\src\execution\single_process_executor.js:57:27)
at Object.mainNgcc (C:\Users\myApp\node_modules\@angular\compiler-cli\ngcc\src\main.js:74:25)
at Object.process (C:\Users\myApp\node_modules\@angular\compiler-cli\ngcc\index.js:29:23)
at NgccProcessor.processModule (C:\Users\myApp\node_modules\@ngtools\webpack\src\ngcc_processor.js:175:16)
at C:\Users\myApp\node_modules\@ngtools\webpack\src\ivy\host.js:146:18
at C:\Users\myApp\node_modules\@ngtools\webpack\src\ivy\host.js:76:24
at Array.map (<anonymous>)
at Object.host.resolveModuleNames (C:\Users\myApp\node_modules\@ngtools\webpack\src\ivy\host.js:74:32)
at actualResolveModuleNamesWorker (C:\Users\myApp\node_modules\typescript\lib\typescript.js:109497:133)
at resolveModuleNamesWorker (C:\Users\myApp\node_modules\typescript\lib\typescript.js:109760:26)
at resolveModuleNamesReusingOldState (C:\Users\myApp\node_modules\typescript\lib\typescript.js:109857:24)
Executing webpack failed with exit code 1.
I have tried various things like deleting node_modules, hooks and package-lock.json and reinstalling with npm i. I still get back to these errors.
Any ideas? Been kicking it around for ages now.
Thanks.
========== UPDATE
@RonEvans I will see if I can provide a tripped down version.
I went back to a working app version in NS 6 and re-did the migration more carefully.
Here is the current set-up:
Angular CLI: 13.2.2
Node: 16.13.2
Package Manager: npm 8.5.0
OS: win32 x64
Angular: 13.1.3
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router
Package Version
---------------------------------------------------------
@angular-devkit/architect 0.1301.4
@angular-devkit/build-angular 13.1.4
@angular-devkit/core 13.1.4
@angular-devkit/schematics 13.2.2 (cli-only)
@angular/http 8.0.0-beta.10+1.sha-a28b3e3
@ngtools/webpack 13.1.4
@schematics/angular 13.2.2 (cli-only)
rxjs 7.4.0
typescript 4.5.5
package.json
"description": "Reports App | Mobile Expense Reports",
"license": "SEE LICENSE IN <your-license-filename>",
"readme": "NativeScript Application",
"repository": "<fill-your-repository-here>",
"scripts": {
"lint": "tslint \"app/**/*.ts\""
},
"dependencies": {
"@angular/animations": "~13.1.1",
"@angular/common": "~13.1.1",
"@angular/compiler": "~13.1.1",
"@angular/core": "~13.1.3",
"@angular/forms": "~13.1.1",
"@angular/http": "8.0.0-beta.10",
"@angular/platform-browser": "~13.1.1",
"@angular/platform-browser-dynamic": "~13.1.1",
"@angular/router": "~13.1.1",
"@master.technology/permissions": "~2.0.1",
"@nativescript-community/ui-material-bottom-navigation": "^6.2.11",
"@nativescript/angular": "~13.0.0",
"@nativescript/core": "~8.1.1",
"@nativescript/fingerprint-auth": "8.0.0",
"nativescript-app-sync": "^2.0.0",
"nativescript-bottom-navigation": "^2.0.5",
"nativescript-camera": "^4.5.0",
"nativescript-drop-down": "^6.0.1",
"nativescript-fancyalert": "~3.1.1",
"nativescript-fingerprint-auth": "~7.0.2",
"nativescript-fontawesome": "^1.0.0",
"nativescript-gradient": "^2.0.1",
"nativescript-imagepicker": "~7.1.0",
"nativescript-iqkeyboardmanager": "^1.5.1",
"nativescript-modal-datetimepicker": "~2.1.5",
"nativescript-pdf-view": "^3.0.0-1",
"nativescript-permissions": "~1.3.12",
"nativescript-theme-core": "~2.0.24",
"nativescript-toast": "^2.0.0",
"nativescript-ui-listview": "~10.0.2",
"reflect-metadata": "~0.1.10",
"ruby": "^0.6.1",
"rxjs": "~7.4.0",
"zone.js": "~0.11.4"
},
"devDependencies": {
"@angular-devkit/build-angular": "~13.1.1",
"@angular/compiler-cli": "~13.1.1",
"@nativescript/android": "~8.1.1",
"@nativescript/webpack": "~5.0.0",
"@ngtools/webpack": "~13.1.1",
"@types/node": "14.6.2",
"babel-traverse": "6.26.0",
"babel-types": "6.26.0",
"babylon": "6.18.0",
"codelyzer": "~4.5.0",
"extract-text-webpack-plugin": "~3.0.2",
"lazy": "1.0.11",
"sass": "~1.39.0",
"tslint": "~5.12.1",
"typescript": "^4.5.5",
"uglifyjs-webpack-plugin": "^2.2.0"
},
"main": "./app/main.js"
}
We are getting the following error on ns run android.
$ tns run android
(node:21536) Warning: Accessing non-existent property 'cat' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
(node:21536) Warning: Accessing non-existent property 'cd' of module exports inside circular dependency
(node:21536) Warning: Accessing non-existent property 'chmod' of module exports inside circular dependency
(node:21536) Warning: Accessing non-existent property 'cp' of module exports inside circular dependency
(node:21536) Warning: Accessing non-existent property 'dirs' of module exports inside circular dependency
(node:21536) Warning: Accessing non-existent property 'pushd' of module exports inside circular dependency
(node:21536) Warning: Accessing non-existent property 'popd' of module exports inside circular dependency
(node:21536) Warning: Accessing non-existent property 'echo' of module exports inside circular dependency
(node:21536) Warning: Accessing non-existent property 'tempdir' of module exports inside circular dependency
(node:21536) Warning: Accessing non-existent property 'pwd' of module exports inside circular dependency
(node:21536) Warning: Accessing non-existent property 'exec' of module exports inside circular dependency
(node:21536) Warning: Accessing non-existent property 'ls' of module exports inside circular dependency
(node:21536) Warning: Accessing non-existent property 'find' of module exports inside circular dependency
(node:21536) Warning: Accessing non-existent property 'grep' of module exports inside circular dependency
(node:21536) Warning: Accessing non-existent property 'head' of module exports inside circular dependency
(node:21536) Warning: Accessing non-existent property 'ln' of module exports inside circular dependency
(node:21536) Warning: Accessing non-existent property 'mkdir' of module exports inside circular dependency
(node:21536) Warning: Accessing non-existent property 'rm' of module exports inside circular dependency
(node:21536) Warning: Accessing non-existent property 'mv' of module exports inside circular dependency
(node:21536) Warning: Accessing non-existent property 'sed' of module exports inside circular dependency
(node:21536) Warning: Accessing non-existent property 'set' of module exports inside circular dependency
(node:21536) Warning: Accessing non-existent property 'sort' of module exports inside circular dependency
(node:21536) Warning: Accessing non-existent property 'tail' of module exports inside circular dependency
(node:21536) Warning: Accessing non-existent property 'test' of module exports inside circular dependency
(node:21536) Warning: Accessing non-existent property 'to' of module exports inside circular dependency
(node:21536) Warning: Accessing non-existent property 'toEnd' of module exports inside circular dependency
(node:21536) Warning: Accessing non-existent property 'touch' of module exports inside circular dependency
(node:21536) Warning: Accessing non-existent property 'uniq' of module exports inside circular dependency
(node:21536) Warning: Accessing non-existent property 'which' of module exports inside circular dependency
Support for Node.js 16.13.2 is not verified. NativeScript CLI might not install or run properly.
No project found at or above 'C:\Users\GerardDaly\apps\fileexpenses' and neither was a --path specified.
It appears the instant you hit Return on tns run android.
It doesn't even get as far as attempting to build it, which is odd.
I have been googling the messages but haven't found anything useful.
Any ideas at all. Thanks.