Error: EPERM: operation not permitted


(Sagar Patro) #1

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.

Details

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’]
cause:
{ 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’,
path:
‘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
6.4.1
$ node -p process.platform
win32