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 ]

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

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

发布了69 篇原创文章 · 获赞 25 · 访问量 10万+

猜你喜欢

转载自blog.csdn.net/xingmei_ok/article/details/104023254