node.js - Does yarn add package --build-from-source behave like npm install package --build-from-source when passing node-gyp flags to packages? -


it looks yarn not pass node-gyp flags native packages way npm does.

for example when attempting install sqlite3@3.1.6 with:

npm install sqlite3@3.1.6 \   --build-from-source \   --sqlite_libname=sqlcipher \   --sqlite=`brew --prefix` \   --verbose 

we successful installation of sqlite3 sqlcipher extensions, due passing --sqlite_libname , --sqlite, specified in sqlite3's binding.gyp.

but, when attempting use yarn, , running think equivalent command, looks flags aren't honored:

yarn add sqlite3@3.1.6 \   --force \   --build-from-source \   --sqlite_libname=sqlcipher \   --sqlite=`brew --prefix` \   --verbose 

with npm unrecognized command line arguments converted gyp flags.

with yarn doesn't seem work.

is there way functionality yarn?

yarn not automatically expose -- arguments of install command lifecycle scripts (pre/post/install scripts in package.json of dependencies). here code yarn builds env script execution https://github.com/yarnpkg/yarn/blob/master/src/util/execute-lifecycle-script.js#l39.

you can pass specific values via env setting in .yarnrc , builds npm_config_* settings based on .yarnrc/.npmrc configuration.


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -