npm.cmd failed with return code: 4294963238

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:27 (3 by maintainers)

github_iconTop GitHub Comments

21reactions
JanEggerscommented, Jun 20, 2018

same issue here, please let me know if there is a better solution than retry and pray

18reactions
elbatkcommented, May 28, 2019

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!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Npm failed with return code: 4294963238, in CI in VSTS
The error message states ENOENT: no such file or directory, open 'D:\a\3\s\package. · @DanielMann Yes, I verified that the file doesn't exist.
Read more >
Npm failed with return code: 4294963248, Error: EPERM
This appears to be a long-standing issue with npm: https://github.com/npm/npm/issues/20059 and seems to occur when a build agent has a handle on some...
Read more >
npm run build error - MSDN - Microsoft
I keep getting this error when VSTS hits my npm run build task. Any ideas? ... ##[error]Error: Npm failed with return code: 4294963238....
Read more >
How to solve the error 'Npm failed with return code: 1' in Azure ...
In this post we share a solution to the 'Npm failed with return code: 1' error which we were experiencing in Azure DevOps...
Read more >
concurrently - npm
[boolean] --kill-others-on-fail Kill other processes if one exits with non zero status code. [boolean] Restarting --restart-tries How many ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found