Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

npm ERR! EPERM : operation not permitted , scandir

Tags:

npm

jenkins

Our deployment process uses Jenkins, but sometimes our build fails with the following

error

We are using npm version : 6.7.0. Any help would be greatly appreciated!

like image 870
Sai Neel Avatar asked Mar 05 '23 13:03

Sai Neel


1 Answers

I think the issue is another process is utilizing that folder so it's locked down, perhaps from a previous build. I would try the following to resolve your issue:

  1. Try running as an admin for your build and see if that resolves the permission error.
  2. Clear out your npm cache prior to installing: npm cache clean --force
  3. Look into yarn for dependency management.

Hopefully that helps!

like image 96
Nathan Avatar answered Mar 12 '23 05:03

Nathan