Sign Up

Have an account? Sign In Now

Sign In

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

Sorry, you do not have a permission to ask a question, You must login to ask question.

Forgot Password?

Need An Account, Sign Up Here
Sign InSign Up

ErrorCorner

ErrorCorner Logo ErrorCorner Logo

ErrorCorner Navigation

  • Home
  • Contact Us
  • About Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Contact Us
  • About Us
Home/ Questions/Q 78
Next
In Process
Kenil Vasani
Kenil Vasani

Kenil Vasani

  • 646 Questions
  • 567 Answers
  • 77 Best Answers
  • 26 Points
View Profile
  • 0
Kenil Vasani
Asked: November 19, 20202020-11-19T06:51:19+00:00 2020-11-19T06:51:19+00:00In: angularjs

Unable to resolve dependency tree error when installing npm packages

  • 0

When trying to install the npm packages using npm i command I am getting the following exception:

I have tried reinstalling the node js package and setting proxy to off using:

set HTTP_PROXY=
set HTTPS_PROXY=

The issue is still there. What I am doing wrong?

angularangular9angularjsnpmtypescript
  • 2 2 Answers
  • 266 Views
  • 0 Followers
  • 0
Answer
Share
  • Facebook

    2 Answers

    • Voted
    1. Kenil Vasani

      Kenil Vasani

      • 646 Questions
      • 567 Answers
      • 77 Best Answers
      • 26 Points
      View Profile
      Kenil Vasani
      2020-11-19T06:51:36+00:00Added an answer on November 19, 2020 at 6:51 am

      When using npm 7, I have experienced this when working with a node_modules/package-lock.json generated with npm 6. Usually using --legacy-peer-deps makes it work.

      When that doesn’t work, an option is to downgrade to npm 6. Downgrading Node.js is not necessary (but not harmful either). The relevant dependency management code is in npm. Downgrading Node.js will often work coincidentally because doing so will often downgrade npm as well.

      Another option that is less disruptive than downgrading npm is using npx to use the previous version of npm for just the install command: npx -p npmNicholassmith npm install

      And when all else fails, it’s often worth a shot to remove the node_modules directory and package-lock.json, and then run npm install again. That regenerates node_modules and package-lock.json.

      • 0
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp
    2. Kenil Vasani

      Kenil Vasani

      • 646 Questions
      • 567 Answers
      • 77 Best Answers
      • 26 Points
      View Profile
      Kenil Vasani
      2020-11-19T06:51:27+00:00Added an answer on November 19, 2020 at 6:51 am

      Try removing the node modules and package-lock.json file and run command npm install or Try npm cache clean --force

      • 0
      • Share
        Share
        • Share on Facebook
        • Share on Twitter
        • Share on LinkedIn
        • Share on WhatsApp

    You must login to add an answer.

    Forgot Password?

    Sidebar

    Ask A Question
    • Popular
    • Kenil Vasani

      SyntaxError: invalid syntax to repo init in the AOSP code

      • 5 Answers
    • Kenil Vasani

      xlrd.biffh.XLRDError: Excel xlsx file; not supported

      • 3 Answers
    • Kenil Vasani

      Homebrew fails on MacOS Big Sur

      • 3 Answers
    • Kenil Vasani

      runtimeError: package fails to pass a sanity check for numpy ...

      • 3 Answers
    • Kenil Vasani

      Unable to resolve dependency tree error when installing npm packages

      • 2 Answers

    Explore

    • Most Answered
    • Most Visited
    • Most Voted
    • Random

    © 2020-2021 ErrorCorner. All Rights Reserved
    by ErrorCorner.com