当前位置: 首页 > 文档资料 > Yarn 中文文档 >

envvars

优质
小牛编辑
126浏览
2023-12-01

Environment variables defined in process.env allow you to configure additional Yarn features.

CHILD_CONCURRENCY

process.env.CHILD_CONCURRENCY=#number#

Controls the number of child processes run parallely to build node modules.

Setting this number to 1 will cause the node modules to be built sequentially which can avoid linker errors on windows with node-gyp.

npm_config

For backward compatiibilty with npm, Yarn allows passing down npm configuration via environment variables. For instance, the --build-from-source npm CLI flag becomes: npm_config_build_from_source=true. For more information on configuring npm, refer to the npm-config page.