You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using node-sass and getting version mismatch issue. This issue, although strikingly similar to #453 and #683, is a bit different in the sense that I'm trying to consume a dependency which uses native modules.
Now, building node-sass and manually copying binaries works, as mentioned here but it is a hacky solution.
For this effect, I tried to use nodeGypRebuild, but setting nodeGypRebuild to true tries to use current working directory as source for binding.gyp which in this case should be ./node_modules/node-sass/ (because of resolution of issue #683here). This means that nodeGypRebuild is meant for rebuilding native modules that I'm using.
So, I tried using npmRebuild in tandem with npmArgs. But, npm unfortunately doesn't pass arguments to npm rebuild to desired postinstall script (corresponding issue here).
But even if this issue is fixed, npmArgs would be passed to all the native modules, which may not be ideal in all the scenarios (although, that would work in my case).
So, can we have a configuration, possibly per dependency, to pass extra arguments to only specified native modules? Maybe something like this?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
node -p process.versions.modules
: 72modules
version: 73I'm using
node-sass
and getting version mismatch issue. This issue, although strikingly similar to #453 and #683, is a bit different in the sense that I'm trying to consume a dependency which uses native modules.Now, building
node-sass
and manually copying binaries works, as mentioned here but it is a hacky solution.For this effect, I tried to use
nodeGypRebuild
, but settingnodeGypRebuild
totrue
tries to use current working directory as source forbinding.gyp
which in this case should be./node_modules/node-sass/
(because of resolution of issue #683 here). This means thatnodeGypRebuild
is meant for rebuilding native modules that I'm using.So, I tried using
npmRebuild
in tandem withnpmArgs
. But,npm
unfortunately doesn't pass arguments tonpm rebuild
to desiredpostinstall
script (corresponding issue here).But even if this issue is fixed,
npmArgs
would be passed to all the native modules, which may not be ideal in all the scenarios (although, that would work in my case).So, can we have a configuration, possibly per dependency, to pass extra arguments to only specified native modules? Maybe something like this?
The text was updated successfully, but these errors were encountered: