npm 6.11.1 breaks npm ci with EPERM on spawn for git repo package

After upgrading npm from 6.10.3 to 6.11.1, running npm ci breaks on installation of a package from a git repository (github: package) with EPERM on a spawn call. Downgrading to 6.10.3 fixes the issue. npm install works fine.

Clearing the cache does not help. Backing pacote off to the previously installed version 9.5.4 does not help.

The relevant package.json line looks like this:

“somepackage”: “github:someuser/somepackage#v6.6.6”

The error output looks like this:

npm ERR! code EPERM
npm ERR! syscall spawn
npm ERR! errno EPERM
npm ERR! Error: spawn EPERM
npm ERR! at ChildProcess.spawn (internal/child_process.js:358:11)
npm ERR! at Object.spawn (child_process.js:533:9)
npm ERR! at promiseRetry (/usr/lib/node_modules/npm/node_modules/pacote/lib/util/git.js:216:24)
npm ERR! at /usr/lib/node_modules/npm/node_modules/promise-retry/index.js:29:24
npm ERR! { Error: spawn EPERM
npm ERR! at ChildProcess.spawn (internal/child_process.js:358:11)
npm ERR! at Object.spawn (child_process.js:533:9)
npm ERR! at promiseRetry (/usr/lib/node_modules/npm/node_modules/pacote/lib/util/git.js:216:24)
npm ERR! at /usr/lib/node_modules/npm/node_modules/promise-retry/index.js:29:24
npm ERR! cause:
npm ERR! { Error: spawn EPERM
npm ERR! at ChildProcess.spawn (internal/child_process.js:358:11)
npm ERR! at Object.spawn (child_process.js:533:9)
npm ERR! at promiseRetry (/usr/lib/node_modules/npm/node_modules/pacote/lib/util/git.js:216:24)
npm ERR! at /usr/lib/node_modules/npm/node_modules/promise-retry/index.js:29:24 errno: ‘EPERM’, code: ‘EPERM’, syscall: ‘spawn’ },
npm ERR! isOperational: true,
npm ERR! stack:
npm ERR! ‘Error: spawn EPERM\n at ChildProcess.spawn (internal/child_process.js:358:11)\n at Object.spawn (child_process.js:533:9)\n at promiseRetry (/usr/lib/node_modules/npm/node_modules/pacote/lib/util/git.js:216:24)\n at /usr/lib/node_modules/npm/node_modules/promise-retry/index.js:29:24’,
npm ERR! errno: ‘EPERM’,
npm ERR! code: ‘EPERM’,
npm ERR! syscall: ‘spawn’ }

We’re running on Ubuntu 14.04.6 LTS, and this is not running in Docker or other container.

Any ideas, or should I file a bug report?

Did you file the report? I can confirm this also happens to me on macOS

Not yet, I’ll do so now that it’s more than just us.

I encountered the same problem.

Finally, I fixed this issue by reinstalling nodejs.