我得到了这个错误,试图从VS代码在WSL上安装软件包。
npm ERR! Error: EACCES: permission denied, rename '/mnt/d/DEVRepo/PWS/functions/node_modules/cssstyle' -> '/mnt/d/DEVRepo/PWS/functions/node_modules/.cssstyle.DELETE'
npm ERR! [OperationalError: EACCES: permission denied, rename '/mnt/d/DEVRepo/PWS/functions/node_modules/cssstyle' -> '/mnt/d/DEVRepo/PWS/functions/node_modules/.cssstyle.DELETE'] {
npm ERR! cause: [Error: EACCES: permission denied, rename '/mnt/d/DEVRepo/PWS/functions/node_modules/cssstyle' -> '/mnt/d/DEVRepo/PWS/functions/node_modules/.cssstyle.DELETE'] {
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'rename',
npm ERR! path: '/mnt/d/DEVRepo/PWS/functions/node_modules/cssstyle',
npm ERR! dest: '/mnt/d/DEVRepo/PWS/functions/node_modules/.cssstyle.DELETE'
npm ERR! },
npm ERR! stack: "Error: EACCES: permission denied, rename '/mnt/d/DEVRepo/PWS/functions/node_modules/cssstyle' -> '/mnt/d/DEVRepo/PWS/functions/node_modules/.cssstyle.DELETE'",
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'rename',
npm ERR! path: '/mnt/d/DEVRepo/PWS/functions/node_modules/cssstyle',
npm ERR! dest: '/mnt/d/DEVRepo/PWS/functions/node_modules/.cssstyle.DELETE',
npm ERR! parent: 'functions'
npm ERR! }
发布于 2022-06-22 13:15:25
在运行时,我遇到了同样的错误/问题。
npm install -g elm-format
WSL版本为Ubuntu 2,缓存良好。封闭VSCode.同样的错误!
对我起作用的是在前面使用数独。
sudo npm install -g elm-format
https://stackoverflow.com/questions/60853873
复制相似问题