When in REPL, we can use packages such as fs, vm directly by default.
But in "node -p"/"node -e", must require these packages manually
returns "fs is not defined"
This makes command line script running such a pain...
Try "node -p", then "not defined" one found, and then require the missing package manually. Repeat this again and again.
When in REPL, we can use packages such as fs, vm directly by default.
But in "node -p"/"node -e", must require these packages manually
returns "fs is not defined"
This makes command line script running such a pain...
Try "node -p", then "not defined" one found, and then require the missing package manually. Repeat this again and again.