- Delete node_modules
rm -rf node_modulesRun it in the folder that has package.json. Nothing of yours is lost: everything in it can be downloaded again.
- Install exactly what the lock file lists
npm ciNo package-lock.json in the project? Use npm install instead.
- Still odd? Clear npm's download cache and try again
npm cache clean --force && npm ci
Check it worked
- Check the packages are back
npm ls --depth=0Lines marked missing or invalid mean something is still wrong.
- Delete node_modules
rm -rf node_modulesRun it in the folder that has package.json. Nothing of yours is lost: everything in it can be downloaded again.
- Install exactly what the lock file lists
npm ciNo package-lock.json in the project? Use npm install instead.
- Still odd? Clear npm's download cache and try again
npm cache clean --force && npm ci
Check it worked
- Check the packages are back
npm ls --depth=0Lines marked missing or invalid mean something is still wrong.
- Delete node_modules
Remove-Item -Recurse -Force node_modulesRun it in the folder that has package.json. Nothing of yours is lost: everything in it can be downloaded again.
- Install exactly what the lock file lists
npm ciNo package-lock.json in the project? Use npm install instead.
- Still odd? Clear npm's download cache and try again
npm cache clean --force; npm ci
Check it worked
- Check the packages are back
npm ls --depth=0Lines marked missing or invalid mean something is still wrong.

New to dependency? I explain it in plain English on Layman Terms.