当我运行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
?完整的重建非常耗时。