Я выполняю следующую команду sudo npm install node-sass --save-dev
, и процесс завершается с ошибкой следующим образом: -
build dir attempting to create "build" dir: /home/anit/Desktop/theInjuredLion/natours/node_modules/node-sass/build
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/home/anit/Desktop/theInjuredLion/natours/node_modules/node-sass/build'
gyp ERR! System Linux 4.15.0-58-generic
gyp ERR! command "/usr/bin/node" "/home/anit/Desktop/theInjuredLion/natours/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /home/anit/Desktop/theInjuredLion/natours/node_modules/node-sass
gyp ERR! node -v v8.10.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
Build failed with error code: 1
Я думаю, что необходимо исправить владение .npm каталога.
sudo chown -R $(User) ~/.npm
и потребность разрешение записи в node_modules каталоге:
sudo chown -R $(User) /home/anit/Desktop/
или
sudo chown -R $(User) /home/anit/Desktop/theInjuredLion/natours/