Nativescript-cli: Angular Project creation fails with dependency issues on Node 15

Created on 12 Dec 2020  Â·  12Comments  Â·  Source: NativeScript/nativescript-cli

─○ 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: zone.[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

Most helpful comment

Finally resolved the issue by installing the node LTS version

v14.15.2

All 12 comments

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: zone.[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.

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: zone.[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...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MrCroft picture MrCroft  Â·  3Comments

ZMW9 picture ZMW9  Â·  3Comments

bradmartin picture bradmartin  Â·  3Comments

charsleysa picture charsleysa  Â·  3Comments

Fatme picture Fatme  Â·  3Comments