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

Cannot find module '@babel/preset-env,' from '<workdir>' while parsing file: <input_file> #270

Closed
Thesephi opened this issue Jul 28, 2018 · 4 comments

Comments

@Thesephi
Copy link

Hello, I noticed that if we follow exactly the README, which is to run the following cli:

browserify script.js -o bundle.js -t [ babelify --presets [ "@babel/preset-env", "@babel/preset-react" ] ]

we could run into the error:

Cannot find module '@babel/preset-env,' from '<workdir>' while parsing file: <input_file>

But if we omit the comma character between @babel/preset-env and @babel/preset-react (in the --presets section), then it runs successfully.

Just wanted to make sure whether this was an issue with my setup or a typo in the README (which likely deserves a tiny fix).

As always, kudos for the awesome work so far on babelify!

@goto-bus-stop
Copy link
Contributor

goto-bus-stop commented Jul 29, 2018

Yes, the sample in the readme is incorrect. The comma should not be there and the quotes are optional

#262

@Thesephi
Copy link
Author

Thanks for the pointer! Hope #262 gets merged soon. This isn't a big deal, but probably will be of help for folks not having the time to tinker around before giving up.

@goto-bus-stop
Copy link
Contributor

aye. thanks for keeping an eye out! :)

@ksloan
Copy link

ksloan commented Aug 8, 2018

This took me a while to figure out too... thanks for the fix!

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

No branches or pull requests

3 participants