7

When I run yarn install, my native add on is always rebuilt. It can be seen that the command node-gyp rebuild is run instead of node-gyp build, even if nothing is updated.

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

How to let yarn run node-gyp build instead of node-gyp rebuild? The complete rebuild is quite time-consuming.

tk421
  • 5,775
  • 6
  • 23
  • 34
Jing Li
  • 639
  • 7
  • 18

1 Answers1

1

You can run the install command and ignore scripts. Note that this might break other libraries.

yarn install --ignore-scripts

https://classic.yarnpkg.com/en/docs/cli/install/#toc-yarn-install-ignore-scripts

Do not execute any scripts defined in the project package.json and its dependencies.

Michal
  • 4,952
  • 8
  • 30
  • 63