azure-pipelines-tasks: npm install task (not msbuild) fails with EPERM on hosted build
It 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
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 102 (44 by maintainers)
Commits related to this issue
- added force flag to appveyor npm install command, fixes https://github.com/npm/npm/issues/9696 https://github.com/Microsoft/vsts-tasks/issues/323 — committed to medfreeman/markdown-it-toc-and-anchor by medfreeman 8 years ago
- added npm3 installation to appveyor config, fixes https://github.com/npm/npm/issues/9696, https://github.com/Microsoft/vsts-tasks/issues/323 — committed to medfreeman/markdown-it-toc-and-anchor by medfreeman 8 years ago
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!