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


基於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.


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM