gulpjs / liftoff

Launch your command line tool with ease.
MIT License
840 stars 52 forks source link

Twice require messages when specifying v8flags #90

Closed sttk closed 5 years ago

sttk commented 6 years ago

Same require message is outputted twice, when a config file needs a loader (ex. hackerfile.babel.js) and v8flags are given, as follows:

$ ls
hacker.js       node_modules/
hackerfile.babel.js package.json
$ node hacker --harmony
Unable to load: @babel/register { [Error: Cannot find module '@babel/register' from '/Users/sttk/hacker'] code: 'MODULE_NOT_FOUND' }
Loading: babel-register
Detected node flags: [ '--harmony' ]
Respawned to PID: 90011
Unable to load: @babel/register { [Error: Cannot find module '@babel/register' from '/Users/sttk/hacker'] code: 'MODULE_NOT_FOUND' }
Loading: babel-register

To fix this issue, this part should be moved to here. (In addition, this modification will enable to configure logs for require and requireFail events!)

-- EDIT: I modified the range of moving part.

phated commented 6 years ago

There's a bunch of issues surrounding js-rechoir that I was digging into earlier this week. I think this could be cleaned up with that stuff too.