npm Community Forum (Archive)

The npm community forum has been discontinued.

To discuss usage of npm, visit the GitHub Support Community.

Error: EPERM: operation not permitted

What I Wanted to Do

I wanted to create a new angular project using “ng new” command thereby installing all the node modules.

What Happened Instead

However the npm package manager failed to install all the required node modules. Not one module got installed.

Reproduction Steps

  1. Open CMD on the project folder. (folder having package,json)
  2. Use “npm install” command.
  3. It fails to install anything at all.


The errors details:

Error: EPERM: operation not permitted, unlink ‘C:\addedByHuman\angular\my-app\node_modules.staging@angular\compiler-86904d6d\bundles\compiler.umd.js’
{ [Error: EPERM: operation not permitted, unlink ‘C:\addedByHuman\angular\my-app\node_modules.staging@angular\compiler-86904d6d\bundles\compiler.umd.js’]
{ Error: EPERM: operation not permitted, unlink ‘C:\addedByHuman\angular\my-app\node_modules.staging@angular\compiler-86904d6d\bundles\compiler.umd.js’
errno: -4048,
code: ‘EPERM’,
syscall: ‘unlink’,
‘C:\addedByHuman\angular\my-app\node_modules\.staging\@angular\compiler-86904d6d\bundles\compiler.umd.js’ },

2018-11-09T07_31_36_370Z-debug.log (733.9 KB)

Platform Info

windows 10,
node version: 11.1.0
npm version: 6.4.1
$ npm --versions
$ node -p process.platform