Я работаю над проектом веб-приложения.Я переустановил свой Ubuntu для некоторых проблем.Я использую nodejs в бэкэнде.Я удалил папку node_modules
.Поэтому я запустил команду sudo npm install
и получил длинную ошибку.Я пытался переустановить npm
, nodejs
, node-gyp
снова и снова, но точного результата не было и все равно получаю те же ошибки.
Есть команда sudo apt-get install g++ build-essential
.Я сделал это, но на этом g++ build-essential
уже установлено последнее обновление.
Итак, что может быть причиной этой ошибки, которую я не получаю.
void@void:~/Documents/github/luvmusic$ sudo npm install
> fibers@1.0.15 install /home/void/Documents/github/luvmusic/node_modules/fibers
> node build.js || nodejs build.js
gyp ERR! configure error
gyp ERR! stack Error: EACCES: permission denied, mkdir '/home/void/Documents/github/luvmusic/node_modules/fibers/build'
gyp ERR! System Linux 4.13.0-43-generic
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--release"
gyp ERR! cwd /home/void/Documents/github/luvmusic/node_modules/fibers
gyp ERR! node -v v8.11.2
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
node-gyp exited with code: 1
Please make sure you are using a supported platform and node version. If you
would like to compile fibers on this machine please make sure you have setup your
build environment--
Windows + OS X instructions here: https://github.com/nodejs/node-gyp
Ubuntu users please run: `sudo apt-get install g++ build-essential`
Alpine users please run: `sudo apk add python make g++`
sh: 1: nodejs: not found
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! fibers@1.0.15 install: `node build.js || nodejs build.js`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the fibers@1.0.15 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/void/.npm/_logs/2018-05-29T15_54_37_402Z-debug.log