Error creating new project in Angular

Asked

Viewed 67 times

-1

I am trying to create a new project via command line (ng new project name_name), but always give this error:

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/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 [email protected]
npm ERR! node_modules/karma-jasmine-html-reporter
npm ERR!   dev karma-jasmine-html-reporter@"^1.5.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\wesle\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\wesle\AppData\Local\npm-cache\_logs\2021-05-20T01_51_26_33
3Z-debug.log
× Package install failed, see above.
The Schematic workflow failed. See above.

Someone can help me?

Thank you for your attention.

Att;

Wesley Jacques

  • Usually this has to do with version incompatibility (Node, npm, packages in general)

  • 1

    Thank you very much friend. Really that was it, I updated Node and gave the npm install -g @angular/cli command and now it works again.

1 answer

-1

Open your package.json and change the Jasmine-core version to "~3.7.1". Then run the npm install to download this dependency and the project will run smoothly when do the ng serves.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.