What could cause an error related to npm not being able to find a file? No contents in my node_modules subfolder. Why is that? What could cause an error related to npm not being able to find a file? No contents in my node_modules subfolder. Why is that? angular angular

What could cause an error related to npm not being able to find a file? No contents in my node_modules subfolder. Why is that?


The following steps work for me:

  1. npm cache clean -f
  2. rm -rf node_modules
  3. npm i


It might be related to corruption in Angular Packages or incompatibility of packages.

Please follow the below steps to solve the issue.

Update

ASP.NET Boilerplate suggests here to use yarn because npm has some problems. It is slow and can not consistently resolve dependencies, yarn solves those problems and it is compatible to npm as well.


I had the SAME issue today and it was driving me nuts!!! What I had done was upgrade to node 8.10 and upgrade my NPM to the latest I uninstalled angular CLI

npm uninstall -g angular-clinpm uninstall --save-dev angular-cli

I then verified my Cache from NPM if it wasn't up to date I cleaned it and ran the install againif npm version is < 5 then use npm cache clean --force

npm install -g @angular/cli@latest

and created a new project file and create a new angular project.