【发布时间】:2021-05-25 02:31:53
【问题描述】:
我使用节点版本 16.2.0 和 npm 版本 7.13,当我尝试在项目上运行 >npm install 时,出现以下情况,
npm ERR!code 1
npm ERR!path / Users / a.aashiq / Desktop / Projects / sdqui / node_modules / node - sass
npm ERR!command failed
npm ERR!command sh - c node - gyp rebuild ^
npm ERR!1 error generated.
npm ERR!make: ** * [Release / obj.target / binding / src / binding.o] Error 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(/Users/a.aashiq / Desktop / Projects / sdqui / node_modules / node - gyp / lib / build.js: 262: 23)
npm ERR!gyp ERR!stack at ChildProcess.emit(node: events: 365: 28)
npm ERR!gyp ERR!stack at Process.ChildProcess._handle.onexit(node: internal / child_process: 290: 12)
npm ERR!gyp ERR!System Darwin 20.4 .0
npm ERR!gyp ERR!command "/opt/homebrew/Cellar/node/16.2.0/bin/node"
"/Users/a.aashiq/Desktop/Projects/sdqui/node_modules/.bin/node-gyp"
"rebuild"
npm ERR!gyp ERR!cwd / Users / a.aashiq / Desktop / Projects / sdqui / node_modules / node - sass
npm ERR!gyp ERR!node - v v16 .2 .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!/Users/a.aashiq / .npm / _logs / 2021 - 05 - 25 T02_21_26_977Z - debug.log
我认为node-sass包和node或npm之间存在一些依赖冲突。我在package.json文件中使用node-sass包版本"node-sass": "^4.14.1",。它之前运行良好,我更新了我的mac,从然后它显示此错误。我通过 brew 安装了节点。如果它解决了,将会有很大的帮助。在此先感谢!
【问题讨论】:
标签: npm package.json node-sass