当我运行时yarn install
,我的原生插件总是被重建。可以看出,node-gyp rebuild
运行的是命令而不是node-gyp build
,即使没有更新。
caros@ubuntu:~/Developer/xviz-converter$ yarn install
yarn install v1.16.0
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
$ node-gyp rebuild
gyp info it worked if it ends with ok
gyp info using node-gyp@3.8.0
gyp info using node@10.16.0 | linux | x64
gyp info spawn /usr/bin/python2
....
如何让纱线运行node-gyp build
而不是node-gyp rebuild
?完全重建非常耗时。