azure-pipelines-tasks: npm.cmd failed with return code: 4294963238
Environment
-
Server - VSTS account name: DartContainer team project name: Web Development build definition name/build number: OTC Portals CI 2.0 / 6.28.1-beta.0
-
Hosted Agent - Hosted VS2017
Issue Description
npm task, install command, version 1.x
Transient failures (frequent all morning if you look at our other builds) installing NPM packages. Always fails with the return code listed above. NPM version is 5.6.0 which is what ships with Node 8.10.
If you’re very very lucky, queueing the build again may fix the problem, because it’s a transient failure.
There seems to be a known issue about this from a while ago, but which is reported fixed. (See #1205 and #323).
Error logs
(Project path names have been sanitized.)
2018-03-09T16:12:43.5340151Z ##[section]Starting: npm install SP
2018-03-09T16:12:43.5344840Z ==============================================================================
2018-03-09T16:12:43.5345158Z Task : npm
2018-03-09T16:12:43.5345463Z Description : Install and publish npm packages, or run an npm command. Supports npmjs.com and authenticated registries like Package Management.
2018-03-09T16:12:43.5345965Z Version : 1.0.10
2018-03-09T16:12:43.5346184Z Author : Microsoft Corporation
2018-03-09T16:12:43.5346448Z Help : [More Information](https://go.microsoft.com/fwlink/?LinkID=613746)
2018-03-09T16:12:43.5346756Z ==============================================================================
2018-03-09T16:12:43.9821935Z [command]C:\Windows\system32\cmd.exe /D /S /C "D:\a\_tool\node\8.10.0\x64\npm.cmd --version"
2018-03-09T16:12:44.8161801Z 5.6.0
2018-03-09T16:12:46.4171194Z [command]C:\Windows\system32\cmd.exe /D /S /C "D:\a\_tool\node\8.10.0\x64\npm.cmd config list"
2018-03-09T16:12:47.2913966Z ; cli configs
2018-03-09T16:12:47.2914588Z metrics-registry = "https://registry.npmjs.org/"
2018-03-09T16:12:47.2914907Z scope = ""
2018-03-09T16:12:47.2915175Z user-agent = "npm/5.6.0 node/v8.10.0 win32 x64"
2018-03-09T16:12:47.2915346Z
2018-03-09T16:12:47.2915570Z ; environment configs
2018-03-09T16:12:47.2915814Z cache = "C:\\npm\\cache"
2018-03-09T16:12:47.2916056Z prefix = "C:\\npm\\prefix"
2018-03-09T16:12:47.2916315Z userconfig = "D:\\a\\1\\npm\\7210.npmrc"
2018-03-09T16:12:47.2916500Z
2018-03-09T16:12:47.2916733Z ; node bin location = D:\a\_tool\node\8.10.0\x64\node.exe
2018-03-09T16:12:47.2917022Z ; cwd = D:\a\1\s\MyProject\MyProject.Web
2018-03-09T16:12:47.2917294Z ; HOME = C:\Users\VssAdministrator
2018-03-09T16:12:47.2917534Z ; "npm config ls -l" to show all defaults.
2018-03-09T16:12:47.2917708Z
2018-03-09T16:12:47.2919963Z [command]C:\Windows\system32\cmd.exe /D /S /C "D:\a\_tool\node\8.10.0\x64\npm.cmd install"
2018-03-09T16:13:15.4313059Z npm WARN dartportal-otc@1.0.0 No description
2018-03-09T16:13:15.4354603Z npm WARN dartportal-otc@1.0.0 No repository field.
2018-03-09T16:13:15.4921431Z npm WARN dartportal-otc@1.0.0 No license field.
2018-03-09T16:13:15.4921600Z
2018-03-09T16:13:15.4922060Z npm ERR! path D:\a\1\s\MyProject\MyProject.Web\node_modules\requirejs\bin\r.js.3170253953
2018-03-09T16:13:15.4922328Z npm ERR! code EPERM
2018-03-09T16:13:15.4922524Z npm ERR! errno -4048
2018-03-09T16:13:15.4922722Z npm ERR! syscall rename
2018-03-09T16:13:15.4923255Z npm ERR! Error: EPERM: operation not permitted, rename 'D:\a\1\s\MyProject\MyProject.Web\node_modules\requirejs\bin\r.js.3170253953' -> 'D:\a\1\s\MyProject\MyProject.Web\node_modules\requirejs\bin\r.js'
2018-03-09T16:13:15.4924728Z npm ERR! { Error: EPERM: operation not permitted, rename 'D:\a\1\s\MyProject\MyProject.Web\node_modules\requirejs\bin\r.js.3170253953' -> 'D:\a\1\s\MyProject\MyProject.Web\node_modules\requirejs\bin\r.js'
2018-03-09T16:13:15.4925459Z npm ERR! cause:
2018-03-09T16:13:15.4925922Z npm ERR! { Error: EPERM: operation not permitted, rename 'D:\a\1\s\MyProject\MyProject.Web\node_modules\requirejs\bin\r.js.3170253953' -> 'D:\a\1\s\MyProject\MyProject.Web\node_modules\requirejs\bin\r.js'
2018-03-09T16:13:15.4926387Z npm ERR! errno: -4048,
2018-03-09T16:13:15.4926644Z npm ERR! code: 'EPERM',
2018-03-09T16:13:15.4926888Z npm ERR! syscall: 'rename',
2018-03-09T16:13:15.4927243Z npm ERR! path: 'D:\\a\\1\\s\\MyProject\\MyProject.Web\\node_modules\\requirejs\\bin\\r.js.3170253953',
2018-03-09T16:13:15.4927830Z npm ERR! dest: 'D:\\a\\1\\s\\MyProject\\MyProject.Web\\node_modules\\requirejs\\bin\\r.js' },
2018-03-09T16:13:15.4928274Z npm ERR! stack: 'Error: EPERM: operation not permitted, rename \'D:\\a\\1\\s\\MyProject\\MyProject.Web\\node_modules\\requirejs\\bin\\r.js.3170253953\' -> \'D:\\a\\1\\s\\MyProject\\MyProject.Web\\node_modules\\requirejs\\bin\\r.js\'',
2018-03-09T16:13:15.4929651Z npm ERR! errno: -4048,
2018-03-09T16:13:15.4929962Z npm ERR! code: 'EPERM',
2018-03-09T16:13:15.4930151Z npm ERR! syscall: 'rename',
2018-03-09T16:13:15.4930429Z npm ERR! path: 'D:\\a\\1\\s\\MyProject\\MyProject.Web\\node_modules\\requirejs\\bin\\r.js.3170253953',
2018-03-09T16:13:15.4930764Z npm ERR! dest: 'D:\\a\\1\\s\\MyProject\\MyProject.Web\\node_modules\\requirejs\\bin\\r.js',
2018-03-09T16:13:15.4931414Z npm ERR! parent: 'dartportal-otc' }
2018-03-09T16:13:15.4931803Z npm ERR!
2018-03-09T16:13:15.4932453Z npm ERR! Please try running this command again as root/Administrator.
2018-03-09T16:13:15.4932633Z
2018-03-09T16:13:15.4932855Z npm ERR! A complete log of this run can be found in:
2018-03-09T16:13:15.4933153Z npm ERR! C:\npm\cache\_logs\2018-03-09T16_13_15_368Z-debug.log
2018-03-09T16:13:15.4937658Z Found npm debug log, make sure the path matches with the one in npm's output: C:\npm\cache\_logs\2018-03-09T16_13_15_368Z-debug.log
2018-03-09T16:13:15.4938129Z 0 info it worked if it ends with ok
2018-03-09T16:13:15.4938365Z 1 verbose cli [ 'D:\\a\\_tool\\node\\8.10.0\\x64\\node.exe',
2018-03-09T16:13:15.4938639Z 1 verbose cli 'D:\\a\\_tool\\node\\8.10.0\\x64\\node_modules\\npm\\bin\\npm-cli.js',
2018-03-09T16:13:15.4938888Z 1 verbose cli 'install' ]
2018-03-09T16:13:15.4939074Z 2 info using npm@5.6.0
2018-03-09T16:13:15.4939272Z 3 info using node@v8.10.0
2018-03-09T16:13:15.4939472Z 4 verbose npm-session 46648d3d26ad6162
2018-03-09T16:13:15.4939699Z 5 silly install runPreinstallTopLevelLifecycles
2018-03-09T16:13:15.4939914Z 6 silly preinstall dartportal-otc@1.0.0
2018-03-09T16:13:15.4940154Z 7 info lifecycle dartportal-otc@1.0.0~preinstall: dartportal-otc@1.0.0
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 3
- Comments: 29 (3 by maintainers)
same issue here, please let me know if there is a better solution than retry and pray
Hello! I’m a PM over on the Azure Artifacts team. I wanted to drop in here and address some of these issues with the news that we’re currently reevaluating the types of tasks we offer in Azure Pipelines, and looking to focus more on lighter-weight tasks that cover authentication and setup. In lieu of the task redesign, we’re going to forego making changes to the current tasks (with a few exceptions). We hope the new tasks we spin up in the next quarter or so are easier and more helpful, be on the lookout!
Same issue here on npm install:
I’m also facing the same issue during CI build in VSTS for an Angular application. Is there any solution for it. The “npm install” task executes well but the “npm run-script build” fails.
@hisuwh We have not seen any
npm install
failures since changing to a Command Line task for thenpm install
stepWe are observing the same intermittent failure when running the
npm install
step of our CI pipeline. Has there been any update on this? This issue makes running CI via Azure Pipelines almost unusable.Since 6/29, I’ve seen nearly 50% failure rates on CI builds, for this NPM error. As @kentonbmax says, if you queue the build again, it usually works, but that’s a giant pain for a CI build you’re expecting to just work. What do you need from us to diagnose this and fix it?
Man this helps me a lot!
We were experiencing this issue increasingly often and so have implemented a workaround using a powershell script to retry. This is not ideal obviously as it increases our build times