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 babel plugins installed globally (locally works great!) #9656

vans163 opened this Issue Mar 8, 2019 · 4 comments


None yet
4 participants
Copy link

vans163 commented Mar 8, 2019

If you globally install requirements for a simple JSX app it does not find.

yarn global add @babel/cli @babel/core @babel/plugin-transform-react-jsx
babel --plugins @babel/plugin-transform-react-jsx index.js

Error: Cannot find module '@babel/plugin-transform-react-jsx' from '/root/app'

But installing the dependencies locally

yarn add @babel/cli @babel/core @babel/plugin-transform-react-jsx --dev
./node_modules/.bin/babel --plugins @babel/plugin-transform-react-jsx index.js


This comment has been minimized.

Copy link

babel-bot commented Mar 8, 2019

Hey @vans163! We really appreciate you taking the time to report an issue. The collaborators
on this project attempt to help as many people as possible, but we're a limited number of volunteers,
so it's possible this won't be addressed swiftly.

If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack
that typically always has someone willing to help. You can sign-up here
for an invite.


This comment has been minimized.

Copy link

danez commented Mar 17, 2019

We do not support mixing of local and global dependencies.


This comment has been minimized.

Copy link

vans163 commented Mar 18, 2019

Im sorry but I do not quite understand, there is no mixing? All the dependencies are global in my case.

I am not mixing.


This comment has been minimized.

Copy link

loganfsmyth commented Mar 18, 2019

You can always resolve the plugin/preset to an absolute path yourself before passing it to Babel, but as-is Babel assumes that plugin-name-resolution is relative to the file referencing the plugin/preset.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.