Can't install dependencies via npm install? Help needed!

C:\Users\mitesh pandey\Desktop\mflix-js>npm install
[ …] / extract:sinon: verb lock using C:\Users\mitesh pandey\AppData\Roaming\npm-cache_locks\staging-943eff699775169b.lock for C:\Users\mites

When i try to npm install It always gets stuck and never moves beyond it. It stucks at something called lock. I tried a lot of times. Previously my node version was 8.9 now i upgraded it to 10 also upgraded npm. But still not working!

Please serious help needed…cant move forward due to this issue!

Hi @david_mitesh,

Please try the solutions from the below links:

Set cache-lock-stale and cache-lock-wait to 10ms each temporarily and npm won’t wait for your lock file to expire. As I understand it npm is trying to wait for all lock files in the _lock folder to be finished and because we are running npm install inside npm install the lock file from the parent process is still in use obviously.


I have tried this solution previously by setting both the parameters to 10ms but still it hangs at the same !

Hi @david_mitesh ,

Thanks for providing the information above. It has been very helpful.

Are you using vscode? After a bit of research online, I have found some people hitting a similar issue with vscode 1.13.0:

Please try the following:

  • If you are on this version please upgrade vscode and try to run npm install again.
  • If you are not using vscode or this does not resolve your issue please try to deactivate any anti-virus you are running on the machine (temporarily) and try running npm install

Even if these steps do not resolve the issue, they will allow us to rule out possible root causes.

Please let us know how it goes. If the issue persists, we will keep troubleshooting.

We may require some additional diagnostic data to review but will get you up and running as soon as possible.


thankyou so much for such quick help.

I disabled my windows defender. Then finally it worked!!!

1 Like

‘jest’ is not recognized as an internal or external command,
operable program or batch file.
npm ERR! Test failed. See above for more details.

Hi @mahendrakumar_30972,

Have you ran npm install command successfully before running npm start ?

Please share the command and screenshot after which you are getting this error.