npm init ngx doesn't succeed to build a new project.
Expected behavior
That it would succeed on first try.
The fix seems to be that jasmine-core needs to be 3.7.1 instead of 3.6.0 as seen in error message below. Changing that and running npm install worked. Not sure if npm init ngx does anything more after npm install.
Minimal reproduction of the problem with instructions
Generating a new project with
niclas@d1:~/dev/sensetif/website$ cd ..
niclas@d1:~/dev/sensetif$ mkdir website2
niclas@d1:~/dev/sensetif$ cd website2
niclas@d1:~/dev/sensetif/website2$ npm init ngx
__ __
_ _ __ _\ \./ / ____ ____ ____ _ _ ____ ___
| ' \/ _` |> < |--< [__] |___ |-:_ |=== |
|_||_\__, /_/°\_\ ENTERPRISE APP STARTER -~*=>
|___/ v9.2.0
? What is the name of your app? website2
? What kind of app do you want to create? Web app
? Do you want a progressive web app? (with manifest and service worker) Yes
? Which UI framework do you want? Angular Material (more website-oriented)
? Which kind of layout do you want? Simple responsive header bar (more website-oriented)
? Do you want authentication? No
? Do you want lazy loading? Yes
? Do you want analytics support (with Angulartics2)? No
? Which languages do you want to support? de-DE, en-US
? Do you want additional tools? Prettier (automatic code formatting), Hads (markdown-based doc system)
? Do you want additional libraries?
? Which automatic deployment do you want? No deployment
create package.json
force .yo-rc.json
:
:
Running npm install, please wait…
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: website-2@1.0.0
npm ERR! Found: jasmine-core@3.6.0
npm ERR! node_modules/jasmine-core
npm ERR! dev jasmine-core@"~3.6.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer jasmine-core@">=3.7.1" from karma-jasmine-html-reporter@1.6.0
npm ERR! node_modules/karma-jasmine-html-reporter
npm ERR! dev karma-jasmine-html-reporter@"^1.5.4" 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 /home/niclas/.npm/eresolve-report.txt for a full report.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/niclas/.npm/_logs/2021-05-14T17_14_05_972Z-debug.log
I'm submitting a...
Current behavior
npm init ngx
doesn't succeed to build a new project.Expected behavior
That it would succeed on first try.
The fix seems to be that
jasmine-core
needs to be3.7.1
instead of3.6.0
as seen in error message below. Changing that and runningnpm install
worked. Not sure ifnpm init ngx
does anything more afternpm install
.Minimal reproduction of the problem with instructions
Generating a new project with
Environment
Others:
Linux Debian 10 npm 7.10.0 node v14.16.0