【问题标题】:Got this error while installing NODE JS安装 NODE JS 时出现此错误
【发布时间】:2018-06-21 15:13:57
【问题描述】:

我正在尝试通过这个安装

sudo npm install

遇到这个错误

gyp ERR! configure error 
gyp ERR! stack Error: EACCES: permission denied, mkdir '/opt/mean/node_modules/node-sass/build'
gyp ERR! System Linux 4.8.0-53-generic
gyp ERR! command "/usr/bin/node" "/opt/mean/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /opt/mean/node_modules/node-sass
gyp ERR! node -v v9.3.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok 
Build failed with error code: 1
npm WARN eslint-config-airbnb@6.0.2 requires a peer of eslint@^2.2.0 but none is installed. You must install peer dependencies yourself.
npm WARN eslint-config-airbnb@6.0.2 requires a peer of eslint-plugin-react@^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.1.2 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.1.2: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@4.5.3 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the node-sass@4.5.3 postinstall 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/ranjit/.npm/_logs/2018-01-12T07_23_24_314Z-debug.lo

g

我也更改了权限。但对我不起作用。

来源 - https://www.digitalocean.com/community/tutorials/how-to-install-a-mean-js-stack-on-an-ubuntu-14-04-server

【问题讨论】:

  • 先尝试以root用户身份登录sudo -i
  • 请回答,以便我接受。你节省了我的时间

标签: node.js linux linux-mint


【解决方案1】:

首先尝试使用此命令sudo -i 以root 用户身份登录。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-05-29
    • 2020-08-16
    • 2019-04-21
    • 2019-01-13
    相关资源
    最近更新 更多