grunt-cli icon indicating copy to clipboard operation
grunt-cli copied to clipboard

Can't have command-line argument "--module" in Node 12

Open cakoose opened this issue 6 years ago • 1 comments

Some of my Grunt tasks take a "--module=..." argument. Under Node 8.15.0, things work fine:

$ grunt --hello=asdf 
Warning: Task "default" not found. Use --force to continue.

Aborted due to warnings.
$ grunt --module=asdf
Warning: Task "default" not found. Use --force to continue.

Under Node 10 and above, something goes wrong when I use "--module=...".

$ grunt --hello=asdf  
Warning: Task "default" not found. Use --force to continue.

Aborted due to warnings.
$ grunt --module=asdf
/Users/kannan/.nodenv/versions/10.17.0/bin/node: bad option: --module=asdf

cakoose avatar Dec 13 '19 06:12 cakoose

The problem can't be solved by grunt I guess, as --module is an option in node itself.

--module execute a file as a JavaScript module. Note: the --module option is implicitly enabled for *.mjs files.

sateffen avatar Mar 01 '20 01:03 sateffen