npm 4080错误 node_modules\.staging
npm各种命令都报这个错误
npm ERR! path C:\Program Files\nodejs\node_modules\.staging
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_modules\.staging'
npm ERR! [OperationalError: EPERM: operation not permitted, mkdir 'C:\Program Files\nodejs\node_modules\.staging'] {
npm ERR! cause: [Error: EPERM: operation not permitted, mkdir 'C:\Program Files\nodejs\node_modules\.staging'] {
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'mkdir',
npm ERR! path: 'C:\\Program Files\\nodejs\\node_modules\\.staging'
npm ERR! },
npm ERR! stack: "Error: EPERM: operation not permitted, mkdir 'C:\\Program Files\\nodejs\\node_modules\\.staging'",
npm ERR! errno: -4048,
npm ERR! code: 'EPERM',
npm ERR! syscall: 'mkdir',
npm ERR! path: 'C:\\Program Files\\nodejs\\node_modules\\.staging'
npm ERR! }
npm ERR!
npm ERR! The operation was rejected by your operating system.
npm ERR! It's possible that the file was already in use (by a text editor or antivirus),
npm ERR! or that you lack permissions to access it.
npm ERR!
npm ERR! If you believe this might be a permissions issue, please double-check the
npm ERR! permissions of the file and its containing directories, or try running
npm ERR! the command again as root/Administrator (though this is not recommended).
npm ERR! A complete log of this run can be found in:
x
1
npm ERR! path C:\Program Files\nodejs\node_modules\.staging
2
npm ERR! code EPERM
3
npm ERR! errno -4048
4
npm ERR! syscall mkdir
5
npm ERR! Error: EPERM: operation not permitted, mkdir 'C:\Program Files\nodejs\node_modules\.staging'
6
npm ERR! [OperationalError: EPERM: operation not permitted, mkdir 'C:\Program Files\nodejs\node_modules\.staging'] {
7
npm ERR! cause: [Error: EPERM: operation not permitted, mkdir 'C:\Program Files\nodejs\node_modules\.staging'] {
8
npm ERR! errno: -4048,
9
npm ERR! code: 'EPERM',
10
npm ERR! syscall: 'mkdir',
11
npm ERR! path: 'C:\\Program Files\\nodejs\\node_modules\\.staging'
12
npm ERR! },
13
npm ERR! stack: "Error: EPERM: operation not permitted, mkdir 'C:\\Program Files\\nodejs\\node_modules\\.staging'",
14
npm ERR! errno: -4048,
15
npm ERR! code: 'EPERM',
16
npm ERR! syscall: 'mkdir',
17
npm ERR! path: 'C:\\Program Files\\nodejs\\node_modules\\.staging'
18
npm ERR! }
19
npm ERR!
20
npm ERR! The operation was rejected by your operating system.
21
npm ERR! It's possible that the file was already in use (by a text editor or antivirus),
22
npm ERR! or that you lack permissions to access it.
23
npm ERR!
24
npm ERR! If you believe this might be a permissions issue, please double-check the
25
npm ERR! permissions of the file and its containing directories, or try running
26
npm ERR! the command again as root/Administrator (though this is not recommended).
27
28
npm ERR! A complete log of this run can be found in:
解决方法:
C:\Program Files\nodejs\
目录属性 安全 权限全授权一下即可完美解决