Ошибка EACCESS при установке пакетов на WSL - PullRequest
0 голосов
/ 25 марта 2020

Я получаю эту ошибку при попытке NPM УСТАНОВИТЬ пакеты на WSL из кода VS.

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! }

1 Ответ

1 голос
/ 25 марта 2020

Проблема заключается в том, что расширение VSCode WSL блокирует файлы, что приводит к ошибке.

Решение состоит в том, чтобы закрыть соединение WSL в VSCode или просто закрыть всю среду IDE и снова выполнить команду npm install.

...