美文网首页前端开发笔记
npm install 错误 | gyp ERR! conf

npm install 错误 | gyp ERR! conf

作者: 大道无形x我有型 | 来源:发表于2019-03-10 07:34 被阅读0次

npm install 错误

gyp ERR! configure error 
gyp ERR! stack Error: EACCES: permission denied, mkdir '/var/www/project_name/node_modules/node-sass/build'
gyp ERR! System Linux 4.4.0-1065-aws
gyp ERR! command "/usr/local/bin/node" "/var/www/project_name/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "-libsass_library="
gyp ERR! cwd /var/www/front-stormsensor/node_modules/node-sass
gyp ERR! node -v v8.11.4
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok 
Build failed with error code: 1

try the following command

sudo npm i --unsafe-perm

if it doesn't work try the following

sudo rm -rf ~/.node-gyp
sudo npm cache clean -f
sudo npm install -g n
sudo n stable
sudo npm i --unsafe-perm

相关文章

网友评论

    本文标题:npm install 错误 | gyp ERR! conf

    本文链接:https://www.haomeiwen.com/subject/eqiepqtx.html