基於node-gyp寫Node.js native addon的時候,碰到一個很噁心的問題。node
調用「node-gyp configure」能成功,再調用「node-gyp」時總會報錯,最後發現時系統時間不對。ui
# Symptonspa
$ node-gyp configureio
$ node-gyp buildfile
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
plugin
# Solutionim
Set correct system time.di