2021年5月5日星期三

Why do I get "node: bad option" error when I pass a custom flag to nodejs command line, in a Angular 9 project

I am trying to add a custom flag in the npm start command, in an Angular 9 project, so that inside the local proxy server, I can intercept the proxy request and manipulate data. But I keep getting the "node: bad option" error. Cannot figure out why. Please help me. Below is my npm start command

"start" : "node -max_old_space_size=8192 --enable-mock ng serve --proxy-config proxy.config.js --host=0.0.0.0 --live-reload false";  

then I just run npm start, then the "node: bad option: --enable-mock" error shows up in the console, I cannot even start the development server.

https://stackoverflow.com/questions/67410846/why-do-i-get-node-bad-option-error-when-i-pass-a-custom-flag-to-nodejs-comman May 06, 2021 at 09:51AM

没有评论:

发表评论