There is a script in my package.json file
"start": "cross-env NODE_ENV=development PORT=3000 CODE_SPLIT=0 node ./react-imvc/bin/www-babel-register",
I need to run the script with the --inspect
flag, but I am unable to modify the package.json. I would like to update the script to include the --inspect
flag as follows:
"start": "cross-env NODE_ENV=development PORT=3000 CODE_SPLIT=0 node --inspect ./react-imvc/bin/www-babel-register"
Instead of modifying the package.json directly, I want to achieve this by running the script through npm using the command:
npm run "cross-env NODE_ENV=development PORT=3000 CODE_SPLIT=0 node --inspect ./react-imvc/bin/www-babel-register"
I tried running the script using npm run script
, but it did not work as expected.
Can anyone guide me on how to run an npm script in the desired way as mentioned above?