2

I've already installed Node.js in my machine. When I try npm install, the installation does not properly work for me. I get the following on my console:

Installed node version 14.15.1

Installed npm version 6.14.8

Installed angular cli version 11.2.3

And then some errors pop up. Here's a screenshot of my console:

enter image description here

1
  • You may accept the the answer if it works :) Commented Apr 21, 2021 at 10:52

1 Answer 1

1

Any of the following methods might be useful for you:

Method 1: Clean cache & then perform an installation

npm cache clean --force
npm install

Method 2: Exclude package-lock.json file and perform an installation

npm install --no-package-lock

Method 3: Manually delete node_modules and package-lock.json file and then perform an installation

npm install
Sign up to request clarification or add additional context in comments.

2 Comments

Method 3 worked for me. Do I need to include the package-lock.json file again to run the project?
Yes, for that run npm install. It should re-generate the package-lock.json file.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.