“NPM err! Error: eperm: operation not permitted” problem solving

Solution of “NPM err! Error: eperm: operation not permitted”

 

Error occurred when NPM running Vue cli to create project under Windows system

npm ERR! Windows_ NT 10.0.14393
npm ERR! argv “C:\\Program Files\\nodejs\\ node.exe ” “C:\\Program Files\\nodejs\\node_ modules\\npm\\bin\\npm- cli.js ” “uninstall” “express” “-g”
npm ERR! node v6.9.1
npm ERR! npm  v3.10.8
npm ERR! path C:\Program Files\nodejs\node_ cache\_ locks
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall mkdir
npm ERR! Error: EPERM: operation not permitted, mkdir ‘C:\Program Files\nodejs\node_ cache\_ locks’
npm ERR!     at Error (native)
npm ERR!  { Error: EPERM: operation not permitted, mkdir ‘C:\Program Files\nodejs\node_ cache\_ locks’
npm ERR!     at Error (native)
npm ERR!   errno: -4048,
npm ERR!   code: ‘EPERM’,
npm ERR!   syscall: ‘mkdir’,
npm ERR!   path: ‘C:\\Program Files\\nodejs\\node_ cache\\_ locks’ }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! Please include the following file with any support request:
npm ERR!     C:\Users\admin\npm- debug.log
 

 

The key point is: operation not permitted.

 

Solution: use Win + X, select the command prompt (administrator), and run the command in it.
 

Read More: