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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid plugin specified in Babel options: "proposal-optional-chaining" #2974

Closed
andrei-cacio opened this issue Nov 4, 2019 · 7 comments
Closed
Assignees

Comments

@andrei-cacio
Copy link

馃悰 bug report

Description of the problem

I am trying to use the babel plugin proposal-optional-chaining in a custom .babelrc file. I simply added the depedency @babel/plugin-proposal-optional-chaining via the Add Dependency button and then I added the @babel/plugin-proposal-optional-chaining plugin name in the plugins attribute in the .babelrc file. Just like the docs stated: https://babeljs.io/docs/en/next/babel-plugin-proposal-optional-chaining.html.

However there seems to be a problem detecting the plugin.

How has this issue affected you? What are you trying to accomplish?

Just wanted to play around with the optional chaining proposal

Link to sandbox: link (optional)

https://codesandbox.io/s/headless-http-io6xu

Your Environment

Software Name/Version
小odesandbox PROD-1572624626-def377908
Browser Chrome latest
Operating System MacOS Catalina
@yiyi1026
Copy link

yiyi1026 commented Nov 15, 2019

I got the same, showing "Transpiling Modules...".

Hours of research, it turns out it's create-react-app causing errors.
But still no idea why codesandbox won't stop transpiling.

@alekslario
Copy link

Bump

@siddharthkp
Copy link
Contributor

siddharthkp commented Nov 26, 2019

Hi 馃憢

I did some tweaking and was able to make this work: https://codesandbox.io/s/proud-hooks-icp6r

  1. Move @babel/core to dependencies instead of devDependencies
  2. In .babelrc, call it proposal-optional-chaining instead of @babel/plugin-proposal-optional-chaining

Both of these are workarounds while the parsing logic failed to get the plugin name right, I'm keeping this open as a bug but have fun with optional chaining, such a cool addition! 馃槃

@andrei-cacio
Copy link
Author

thank you @siddharthkp! I will give it a go.

@siddharthkp siddharthkp self-assigned this Nov 28, 2019
@github-actions
Copy link

github-actions bot commented Sep 4, 2020

This issue is stale because it has been open many days with no activity. It will be closed soon unless the stale label is removed or a comment is made.

@github-actions github-actions bot added the stale label Sep 4, 2020
@github-actions
Copy link

This issue has been automatically closed because there wasn't any activity after the previous notice or the stale label wasn't removed.

@lobsterkatie
Copy link

Just ran into this, and can confirm that calling it "proposal-optional-chaining" in the config fixed the problem. But this should be reopened, because it's still a bug.

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

5 participants