npm install task (not msbuild) fails with EPERM on hosted build
See original GitHub issueIt looks like there are some problems with permissions while installing various packages over npm install
.
When I run my build for the 1st time I received the following errors:
npm ERR! Error: EPERM, open 'C:\NPM\Cache\bb33797c-ache-minimatch-2-0-8-package-tgz.lock'
npm ERR! { [Error: EPERM, open 'C:\NPM\Cache\bb33797c-ache-minimatch-2-0-8-package-tgz.lock']
npm ERR! errno: 50,
npm ERR! code: 'EPERM',
npm ERR! path: 'C:\\NPM\\Cache\\bb33797c-ache-minimatch-2-0-8-package-tgz.lock' }
npm ERR!
After that I just run my build for the 2nd time without any modifications and I got the following errors:
npm ERR! Error: EPERM, open 'C:\NPM\Cache\e360d466-Cache-inherits-2-0-1-package-tgz.lock'
npm ERR! { [Error: EPERM, open 'C:\NPM\Cache\e360d466-Cache-inherits-2-0-1-package-tgz.lock']
npm ERR! errno: 50,
npm ERR! code: 'EPERM',
npm ERR! path: 'C:\\NPM\\Cache\\e360d466-Cache-inherits-2-0-1-package-tgz.lock' }
npm ERR!
I receiving that errors on VSO
Issue Analytics
- State:
- Created 8 years ago
- Comments:102 (44 by maintainers)
Top Results From Across the Web
Builds randomly fail or succeed on NPM Install
We have a custom NPM install as a project build step and most of the time it succeeds but sometimes it fails. Not...
Read more >npm - EPERM: operation not permitted on Windows
In my case, I was facing this error because my directory and its file were opened in my editor (VS code) while I...
Read more >Fix Node MSBuild Exit code 1 | Workaround guide - YouTube
Want to install something using npm, but can't because of an annoying MSBuild error code? Well, this video has a permanent solution that...
Read more >How to Fix MSBuild: Error MSB3428 - Ryan Hayes
The error message mentions that you need to install MSBuild or Visual Studio. That works, of course, and is one solution. If you...
Read more >[SOLVED] Node-gyp error, node_modules does not get ...
[SOLVED] Node-gyp error, node_modules does not get created, please help ... To enable parallel build, please add the "/m" switch. npm ERR!
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Based on this thread, I may have found a workaround: first install npm@3, then run that using a Command Line task to do the actual npm install:
My npm install tasks finished successfully without having to restart it multiple times for the first time in months!
Closing.
It was confirmed as an npm2 bug and the fix was made to npm2 It’s not a bug in npm3. We finished moving most pools to premium storage in the hosted pool (at our cost) which minimizes the chance if you hit it.