I'm using node v6.11.2, npm v5.3.0 and angular/cli v1.2.7.
I'm suddenly receiving the following error message for a majority of my npm installs. Never seen it before...
mmeppiel@MC-LT-MMEPPIEL MINGW64 ~/Desktop/Angular Solutions/my-app (master)
$ npm install --save [email protected] font-awesome
npm ERR! path C:\Users\mmeppiel\Desktop\Angular Solutions\my-app\node_modules\fs events\node_modules
npm ERR! code EPERM
npm ERR! errno -4048
npm ERR! syscall lstat
npm ERR! Error: EPERM: operation not permitted, lstat 'C:\Users\mmeppiel\Desktop \Angular Solutions\my-app\node_modules\fsevents\node_modules'
npm ERR! at Error (native)
npm ERR! { Error: EPERM: operation not permitted, lstat 'C:\Users\mmeppiel\Desk top\Angular Solutions\my-app\node_modules\fsevents\node_modules'
npm ERR! at Error (native)
npm ERR! stack: 'Error: EPERM: operation not permitted, lstat \'C:\\Users\\mme ppiel\\Desktop\\Angular Solutions\\my-app\\node_modules\\fsevents\\node_modules\ '\n at Error (native)',
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'lstat',
npm ERR! path: 'C:\\Users\\mmeppiel\\Desktop\\Angular Solutions\\my-app\\node_ modules\\fsevents\\node_modules' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\mmeppiel\AppData\Roaming\npm-cache\_logs\2017-08-08T00_56_ 59_442Z-debug.log
Can anyone explain what's going on here? Things I've tried:
Appreciate your time!
I get this error when running Visual Studio Code because the typescript compiler watches files and locks them (see https://github.com/Microsoft/vscode/issues/28593). The solution is to temporarily close VS Code when dealing with NPM. Perhaps you have something watching files?