gpt4 book ai didi

node.js - 安装 NODE JS 时出现此错误

转载 作者:塔克拉玛干 更新时间:2023-11-03 01:17:51 25 4
gpt4 key购买 nike

我正在尝试通过这个安装

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

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

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

最佳答案

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

关于node.js - 安装 NODE JS 时出现此错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48221496/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com