Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Offer to install missing imports #9

Open
callumlocke opened this issue Mar 15, 2016 · 1 comment
Open

Offer to install missing imports #9

callumlocke opened this issue Mar 15, 2016 · 1 comment

Comments

@callumlocke
Copy link
Owner

If the uncaughtException handler receives a 'module not found' error, and it's for an node_modules package (i.e. string does not start with ../ or ./ or /)... the script should still exit with code 1, but then esbox should offer to install the missing dep.

  • user can type i Enter to do npm install NAME
  • or s Enter for npm install --save NAME
  • or d Enter for npm install --save-dev NAME

and if there's no package.json, and the user chooses to save or save-dev, esbox should first create a package.json file containing {} before running the command.

@developit
Copy link

Just a +1 for this - similar to how esnextb.in detects dependencies using browser-module-sandbox, which is using detective under the hood.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants