[Tips]Fix node.js addon build error: \"gyp: binding.gyp not found\"

╄→гoц情女王★ 提交于 2020-01-24 07:07:48

基于node-gyp写Node.js native addon的时候,碰到一个很恶心的问题。

调用“node-gyp configure”能成功,再调用“node-gyp”时总会报错,最后发现时系统时间不对。

# Sympton

$ node-gyp configure

$ node-gyp build

make: Entering directory `/home/piaoger/Public/Piaoger/nodeaddon/build'
make: Warning: File `Release/.deps/./Release/nppluginproxy.node.d' has modification time 2.7e+06 s in the future
  ACTION Regenerating Makefile
gyp: binding.gyp not found (cwd: /home/piaoger/Public/Piaoger/nodeaddon/build) while trying to load binding.gyp
make: *** [Makefile] Error 1

# Solution

Set correct system time.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!