question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Projects created wth ng new do not install

See original GitHub issue

🐞 Bug report

Command (mark with an x)

  • new
  • build
  • serve
  • test
  • e2e
  • generate
  • add
  • update
  • lint
  • extract-i18n
  • run
  • config
  • help
  • version
  • doc

Is this a regression?

Yes, the previous version in which this bug was not present was: v11

Description

Projected created with `ng new` and routing fails to install.

πŸ”¬ Minimal Reproduction

  1. Run $ ng new gaya-web - command fails
  2. After, run: cd gaya-web && npm install - command fails with same error as above

πŸ”₯ Exception or Error




gaya-web$ npm install
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: gaya-web@0.0.0
npm ERR! Found: @angular/core@undefined
npm ERR! node_modules/@angular/core
npm ERR!   @angular/core@"~12.1.1" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer @angular/core@"12.1.1" from @angular/animations@12.1.1
npm ERR! node_modules/@angular/animations
npm ERR!   @angular/animations@"~12.1.1" 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/noce2/.npm/eresolve-report.txt for a full report.

🌍 Your Environment





     _                      _                 ____ _     ___
    / \   _ __   __ _ _   _| | __ _ _ __     / ___| |   |_ _|
   / β–³ \ | '_ \ / _` | | | | |/ _` | '__|   | |   | |    | |
  / ___ \| | | | (_| | |_| | | (_| | |      | |___| |___ | |
 /_/   \_\_| |_|\__, |\__,_|_|\__,_|_|       \____|_____|___|
                |___/
    

Angular CLI: 12.1.1
Node: 12.20.0
Package Manager: npm 7.19.1
OS: linux x64

Anything else relevant?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:2
  • Comments:5

github_iconTop GitHub Comments

1reaction
alan-agius4commented, Jul 26, 2021

Hi @noce2, unfortunately, this is not actionable by us. Please raise an issue in the NPM issue tracker.

@juanpicado & @Dr-NULL, you are experiencing a different issue which should no longer be reproducible using the latest stable version of the Angular CLI.

1reaction
alan-agius4commented, Jul 6, 2021

This seems like a defect in NPM 7.

Several options to workaround the problem with NPM 7 include:

  • passing the --force option to ng update which will propagate the force flag to npm.
  • Downgrade to NPM 6.
  • Switch to yarn as a package manager.
Read more comments on GitHub >

github_iconTop Results From Across the Web

ng new - Angular
Option Description Value Type Default Value ‑‑commit Initial git repository commit information. boolean true ‑‑directory The directory name to create the workspace in. string ‑‑force Force...
Read more >
Issue with " ng new " -- Not able to create a new project. #16987
Just try to create a new angular project through command prompt. ng new app01. It is not installing properly and node_modules also missing....
Read more >
Angular 9 ng new stuck at installing packages - Stack Overflow
At the time of creating new project with cli all files in root folder are generating but it is stuck at the part...
Read more >
Angular CLI - ng new Command - Tutorialspoint
Sr.No. Option & Syntax Description 5 ‑‑directory=directory The directory name to create the workspa... 13 ‑‑packageManager=npm|yarn|pnpm|cnpm The package manager used to install dep...
Read more >
Angular CLI | Angular Project Setup - GeeksforGeeks
Angular CLI | Angular Project Setup ; Step-1: Install angular cli npm install - g @angular/cli ; Step-2: Create new project by this...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found