Angular Project creation fails with dependency issues on Node 15
─○ ns create Error while loading nativescript-cloud is: Default commands should be required before child commands
Let’s create a NativeScript app!
Answer the following questions to help us build the right app for you. (Note: you can skip this prompt next time using the --template option, or the --ng, --react, --vue, --svelte, --ts, or --js flags.)
? First, what will be the name of your app? *******
? Next, which style of NativeScript project would you like to use: Angular
? Finally, which template would you like to start from: Tabs npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: @nativescript/[email protected] npm ERR! Found: [email protected] npm ERR! node_modules/zone.js npm ERR! zone.js@"~0.11.1" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer zone.js@"~0.10.3" from @angular/[email protected] npm ERR! node_modules/@angular/core npm ERR! @angular/core@"~11.0.0" from the root project npm ERR! peer @angular/core@"11.0.4" from @angular/[email protected] npm ERR! node_modules/@angular/animations npm ERR! @angular/animations@"~11.0.0" from the root project npm ERR! npm ERR! Fix the upstream dependency conflict, or retry npm ERR! this command with --force, or --legacy-peer-deps npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
Angular CLI version Angular CLI: 11.0.4 Node: 15.3.0 OS: darwin x64
Nativescript CLI version ╰─○ ns --version 7.0.11
Wanted to try out NS today but this greeted me.
Using @nativescript/schematics also resulted in the same error
ng new --collection=@nativescript/schematics my-mobile-app
⠙ Installing packages (npm)...npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: [email protected] npm ERR! Found: [email protected] npm ERR! node_modules/zone.js npm ERR! zone.js@"~0.11.1" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer zone.js@"~0.10.3" from @angular/[email protected] npm ERR! node_modules/@angular/core npm ERR! @angular/core@"~11.0.0" from the root project npm ERR! peer @angular/core@"11.0.5" from @angular/[email protected] npm ERR! node_modules/@angular/animations npm ERR! @angular/animations@"~11.0.0" from the root project npm ERR! npm ERR! Fix the upstream dependency conflict, or retry npm ERR! this command with --force, or --legacy-peer-deps npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
Finally resolved the issue by installing the node LTS version
v14.15.2
That's a non solution, it should work on Node 15. Could you please reopen the ticket and rename it so the title includes "on Node 15"? @csivaprasadc
@AlexAegis As requested, I reopened the issue.
I'm running into a very similar problem. New install of WSL2 with Ubuntu 20.04 LTS, latest LTS nodejs (v15.7.0) and angular 11: Angular CLI: 11.0.4 Node: 15.7.0 OS: linux x64
Angular: ... Ivy Workspace:
Package Version
@angular-devkit/architect 0.1100.4 (cli-only) @angular-devkit/core 11.0.4 (cli-only) @angular-devkit/schematics 11.0.4 (cli-only) @schematics/angular 11.0.4 (cli-only) @schematics/update 0.1100.4 (cli-only)
command: ng new [project name]
output:
npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: [email protected] npm ERR! Found: @angular/[email protected] npm ERR! node_modules/@angular/compiler npm ERR! @angular/compiler@"~11.0.4" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer @angular/compiler@"11.1.1" from @angular/[email protected] npm ERR! node_modules/@angular/compiler-cli npm ERR! peer @angular/compiler-cli@"^11.0.0" from @angular-devkit/[email protected] npm ERR! node_modules/@angular-devkit/build-angular npm ERR! npm ERR! Fix the upstream dependency conflict, or retry npm ERR! this command with --force, or --legacy-peer-deps npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
Had to go into the project directory and run the suggested command to fix the problem: npm install --legacy-peer-deps
When I did I got the following warnings:
npm WARN deprecated [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2. npm WARN deprecated [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies. npm WARN deprecated [email protected]: this library is no longer supported npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797) npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797) npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142 npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797) npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797) npm WARN deprecated [email protected]: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2. npm WARN deprecated [email protected]: "Please update to latest v2.3 or v2.2" npm WARN deprecated [email protected]: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies. npm WARN deprecated [email protected]: TSLint has been deprecated in favor of ESLint. Please see https://github.com/palantir/tslint/issues/4534 for more information.
A command this simple should not fail, and definitely not this spectacularly.
https://github.com/NativeScript/nativescript-cli/issues/5482#issuecomment-765526592
i m getting the same error i even uninstalled node then cleared cache.even though i m unable to solve this problem please hel
Seriously cant be the only people getting this?
npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: [email protected] npm ERR! Found: [email protected] npm ERR! node_modules/zone.js npm ERR! zone.js@"~0.11.1" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer zone.js@"~0.10.3" from @angular/[email protected] npm ERR! node_modules/@angular/core npm ERR! @angular/core@"~11.0.0" from the root project npm ERR! peer @angular/core@"11.0.9" from @angular/[email protected] npm ERR! node_modules/@angular/animations npm ERR! @angular/animations@"~11.0.0" from the root project npm ERR! npm ERR! Fix the upstream dependency conflict, or retry npm ERR! this command with --force, or --legacy-peer-deps npm ERR! to accept an incorrect (and potentially broken) dependency resolution. npm ERR! npm ERR! See /Users/raybell/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in: npm ERR! /Users/raybell/.npm/_logs/2021-06-04T02_29_58_669Z-debug.log ✖ Package install failed, see above. The Schematic workflow failed. See above.
Im having the same issue.
I am having the same issue. Tried changing the versions but still same. Any help would be greatly appreciated.
Having the same issue, upgrading to 14.15.2 didn't help...
I still have the issue here.
Angular CLI: 12.2.10 Node: 16.12.0 (Unsupported) Package Manager: npm 8.1.0
Even with Node 14 and 15 the installation failed.
| Installing packages (npm)...npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/zone.js
npm ERR! zone.js@"~0.11.1" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer zone.js@"~0.10.3" from @angular/[email protected]
npm ERR! node_modules/@angular/core
npm ERR! @angular/core@"~11.0.0" from the root project
npm ERR! peer @angular/core@"11.0.9" from @angular/[email protected]
npm ERR! node_modules/@angular/animations
npm ERR! @angular/animations@"~11.0.0" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.```
npm ERR! code ERESOLVE npm ERR! ERESOLVE unable to resolve dependency tree npm ERR! npm ERR! While resolving: [email protected] npm ERR! Found: [email protected] npm ERR! node_modules/zone.js npm ERR! zone.js@"0.11.3" from the root project npm ERR! npm ERR! Could not resolve dependency: npm ERR! peer zone.js@"~0.11.4" from @angular/[email protected] npm ERR! node_modules/@angular/core npm ERR! @angular/core@"^12.2.0" from the root project npm ERR! peer @angular/core@"12.2.11" from @angular/[email protected] npm ERR! node_modules/@angular/animations npm ERR! @angular/animations@"^12.2.0" from the root project npm ERR! npm ERR! Fix the upstream dependency conflict, or retry npm ERR! this command with --force, or --legacy-peer-deps npm ERR! to accept an incorrect (and potentially broken) dependency resolution. npm ERR! npm ERR! See C:\Users\prave\AppData\Local\npm-cache\eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\prave\AppData\Local\npm-cache_logs\2021-10-24T06_22_00_159Z-debug.log
I'm also facing the same error when I tried to do npm i, why this error is occurring ?
My Node Version is 16.9.0
What command is this happening with? Creating a new project with ns create myCoolNGApp --ng works without issues:
> node -v
v17.0.1
> npm -v
8.1.0
> ns -v
8.1.4
✔ Up to date.
> ns create myCoolNGApp --ng
Project myCoolNGApp was successfully created.
Now you can navigate to your project with cd myCoolNGApp and then:
Run the project on multiple devices:
$ ns run ios
$ ns run android
Debug the project with Chrome DevTools:
$ ns debug ios
$ ns debug android
For more options consult the docs or run ns --help
Running ns clean and then npm i again also works fine.