How to avoid node-gyp rebuild when running yarn install?
Asked Answered
H

1

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 [email protected]
gyp info using [email protected] | 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.

Haemolysis answered 20/6, 2019 at 6:52 Comment(0)
A
3

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.

Aimless answered 26/11, 2021 at 23:13 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.