我正在尝试使用npm install amqplib安装amqplib。 gyp返回构建错误,并且amqplib未安装。我不太肯定这是gyp的问题,可能还会发生其他情况。
据我所知,我已经检查确保gyp所需的所有依赖项都已安装在我的计算机(Linux Mint 18.3)上,包括gcc,python2.7和make。
安装尝试的错误输出如下所示。
binding.target.mk:121: recipe for target 'Release/obj.target/binding/src/binding.o' failed
make: *** [Release/obj.target/binding/src/binding.o] Error 1
make: Leaving directory '/home/matt/Telemetry/chase-ui/node_modules/node-sass/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/home/matt/Telemetry/chase-ui/node_modules/node-gyp/lib/build.js:258:23)
gyp ERR! stack at ChildProcess.emit (events.js:200:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Linux 4.10.0-38-generic
gyp ERR! command "/usr/bin/node" "/home/matt/Telemetry/chase-ui/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
gyp ERR! cwd /home/matt/Telemetry/chase-ui/node_modules/node-sass
gyp ERR! node -v v12.3.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
Build failed with error code: 1
npm WARN ajv-keywords@3.2.0 requires a peer of ajv@^6.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN flux@3.1.3 requires a peer of react@^15.0.2 || ^16.0.0-beta || ^16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-chartjs-2@2.7.0 requires a peer of react@^0.14.0 || ^15.0.0 || ^16.0.0-beta || ^16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-dom@16.2.0 requires a peer of react@^16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-iframe@1.1.0 requires a peer of react@>=16.x.x but none is installed. You must install peer dependencies yourself.
npm WARN react-json-view@1.16.1 requires a peer of react@^16.0.0 || ^15.5.4 but none is installed. You must install peer dependencies yourself.
npm WARN react-router@4.2.0 requires a peer of react@>=15 but none is installed. You must install peer dependencies yourself.
npm WARN react-router-dom@4.2.2 requires a peer of react@>=15 but none is installed. You must install peer dependencies yourself.
npm WARN react-sidebar@2.3.2 requires a peer of react@>=0.14.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-textarea-autosize@5.2.1 requires a peer of react@>=0.14.0 <17.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN react-time@4.3.0 requires a peer of react@>=0.13.0 <16.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.4 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.4: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-sass@4.9.0 postinstall: `node scripts/build.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-sass@4.9.0 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/matt/.npm/_logs/2019-06-02T15_36_34_677Z-debug.log