请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

centos系统,已经安装了npm,cnpm,node.js 创建项目报错,请老师帮忙解答。

centos系统,已经安装了npm,cnpm,node.js

创建项目报错:

pm ERR! code 1
npm ERR! path /usr/local/njy-datav/node_modules/node-sass
npm ERR! command failed
npm ERR! command sh -c node-gyp rebuild
npm ERR! make: 进入目录“/usr/local/njy-datav/node_modules/node-sass/build”
npm ERR! CXX(target) Release/obj.target/libsass/src/libsass/src/ast.o
npm ERR! make: 离开目录“/usr/local/njy-datav/node_modules/node-sass/build”
npm ERR! (node:101704) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
npm ERR! (Use node --trace-deprecation ... to show where the warning was created)
npm ERR! g++: 错误:unrecognized command line option ‘-std=gnu++14’
npm ERR! make: *** [Release/obj.target/libsass/src/libsass/src/ast.o] 错误 1
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: make failed with exit code: 2
npm ERR! gyp ERR! stack at ChildProcess.onExit (/usr/local/njy-datav/node_modules/node-gyp/lib/build.js:262:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:390:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:290:12)
npm ERR! gyp ERR! System Linux 3.10.0-1160.el7.x86_64
npm ERR! gyp ERR! command “/usr/local/node-v16.13.0-linux-x64/bin/node” “/usr/local/njy-datav/node_modules/.bin/node-gyp” "rebuild"
npm ERR! gyp ERR! cwd /usr/local/njy-datav/node_modules/node-sass
npm ERR! gyp ERR! node -v v16.13.0
npm ERR! gyp ERR! node-gyp -v v3.8.0
npm ERR! gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2021-10-29T06_37_09_652Z-debug.log
ERROR command failed: npm install --loglevel error --legacy-peer-deps

正在回答 回答被采纳积分+3

3回答

丿丨丨丨 2022-03-17 01:58:28

就是因为node-sass的问题可以换成第一个dart-sass

1 回复 有任何疑惑可以回复我~
慕村_wgf 2022-01-20 11:31:16

好像是node-sass的问题吧

1 回复 有任何疑惑可以回复我~
慕妹4483901 2021-11-12 00:14:43

同样的问题

1 回复 有任何疑惑可以回复我~
问题已解决,确定采纳
还有疑问,暂不采纳
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号