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