npm报错error code EPERM, error syscall unlink,errno -4048解决

安装报错信息

24741 error code EPERM
24742 error syscall unlink
24743 error path E:\workspaces\multiplatform\node_modules\.staging\regexpp-c7c47c68\index.js.map
24744 error errno -4048
24745 error Error: EPERM: operation not permitted, unlink 'E:\workspaces\multiplatform\node_modules\.staging\regexpp-c7c47c68\index.js.map'
24745 error  [OperationalError: EPERM: operation not permitted, unlink 'E:\workspaces\multiplatform\node_modules\.staging\regexpp-c7c47c68\index.js.map'] {
24745 error   cause: [Error: EPERM: operation not permitted, unlink 'E:\workspaces\multiplatform\node_modules\.staging\regexpp-c7c47c68\index.js.map'] {
24745 error     errno: -4048,
24745 error     code: 'EPERM',
24745 error     syscall: 'unlink',
24745 error     path: 'E:\\workspaces\\multiplatform\\node_modules\\.staging\\regexpp-c7c47c68\\index.js.map'
24745 error   },
24745 error   stack: "Error: EPERM: operation not permitted, unlink 'E:\\workspaces\\multiplatform\\node_modules\\.staging\\regexpp-c7c47c68\\index.js.map'",
24745 error   errno: -4048,
24745 error   code: 'EPERM',
24745 error   syscall: 'unlink',
24745 error   path: 'E:\\workspaces\\multiplatform\\node_modules\\.staging\\regexpp-c7c47c68\\index.js.map',
24745 error   parent: 'prettier-eslint' 
24745 error }
24746 error The operation was rejected by your operating system.
24746 error It's possible that the file was already in use (by a text editor or antivirus),
24746 error or that you lack permissions to access it.
24746 error
24746 error If you believe this might be a permissions issue, please double-check the
24746 error permissions of the file and its containing directories, or try running
24746 error the command again as root/Administrator.
24747 verbose exit [ -4048, true ]

试了了好多办法,都没有解决。还是这个问题。最后一个大招,问题解决了

开始菜单——》命令行——》管理员身份运行

npm报错error code EPERM, error syscall unlink,errno -4048解决_第1张图片

npm报错error code EPERM, error syscall unlink,errno -4048解决_第2张图片

你可能感兴趣的:(npm)