Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set multiple values for node_options?

Tags:

node.js

In my case, I need two values for NODE_OPTIONS:

NODE_OPTIONS=--max_old_space_size=4096
NODE_OPTIONS=--openssl-legacy-provider

I tried:

cross-env NODE_OPTIONS=--max_old_space_size=4096 --openssl-legacy-provider umi build

But not working.

like image 555
Aloento Avatar asked Nov 21 '25 08:11

Aloento


2 Answers

In package.json, the following works for me-

"build": "cross-env NODE_OPTIONS=\"--max_old_space_size=4096 --openssl-legacy-provider\" umi build"
like image 95
dadadidudu Avatar answered Nov 23 '25 00:11

dadadidudu


You can try like this-

NODE_OPTIONS="--max_old_space_size=4096 --openssl-legacy-provider" umi build
like image 26
Richard Sai Law Avatar answered Nov 23 '25 00:11

Richard Sai Law



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!