【发布时间】:2018-05-25 19:51:57
【问题描述】:
我为这个问题创建了一个测试项目。
https://github.com/ivandejanovic/test
当我尝试在 Ubuntu 18.04 上构建 docker 映像时一切正常,但是当我尝试在 macOS 10.13.4 上时
我收到此错误:
> snappy@6.0.4 install /usr/src/app/node_modules/snappy
> node-gyp rebuild
make: Entering directory '/usr/src/app/node_modules/snappy/build'
CXX(target) Release/obj.target/snappy/deps/snappy/snappy-1.1.7/snappy-sinksource.o
CXX(target) Release/obj.target/snappy/deps/snappy/snappy-1.1.7/snappy-stubs-internal.o
CXX(target) Release/obj.target/snappy/deps/snappy/snappy-1.1.7/snappy.o
AR(target) Release/obj.target/deps/snappy/snappy.a
COPY Release/snappy.a
CXX(target) Release/obj.target/binding/src/binding.o
In file included from ../src/./binding.h:3:0,
from ../src/binding.cc:1:
/root/.node-gyp/10.2.0/include/node/node.h:53:50: fatal error: core.h:
No such file or directory
#include "core.h" // NOLINT(build/include_order)
^
compilation terminated.
make: Leaving directory '/usr/src/app/node_modules/snappy/build'
make: *** [binding.target.mk:102:
Release/obj.target/binding/src/binding.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit
(/usr/local/lib/node_modules/npm/node_modules/node-
gyp/lib/build.js:258:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit
(internal/child_process.js:237:12)
gyp ERR! System Linux 4.9.87-linuxkit-aufs
gyp ERR! command "/usr/local/bin/node"
"/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js"
"rebuild"
gyp ERR! cwd /usr/src/app/node_modules/snappy
gyp ERR! node -v v10.2.0
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok
可能与此问题有关: https://github.com/Blizzard/node-rdkafka/issues/292
知道如何在 Mac 上解决这个问题吗?
【问题讨论】: