microbundle: Error: Plugin 'jsx' not found

Hi there, I was super excited to find this project. Unfortunately, I can’t get it working. I end up getting this error whenever I do anything:

$ npm run prepare
> react-multicast@1.0.0 prepare /Users/aaronjensen/Source/react-multicast
> microbundle

Error: Plugin 'jsx' not found

Here’s my repro repo: https://github.com/substantial/react-multicast (checkout branch repro)

Maybe I’m just doing something wrong?

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 7
  • Comments: 16 (3 by maintainers)

Most upvoted comments

I was able to fix this by deleting package-lock.json, node_modules, karmatic and using yarn…

FYI: I have a fix for this ready. Just need to clean up the commits a bit, but I have a solution in place. Hopefully the PR will be ready this weekend.

This error went away for me after deleting node_modules and upgrading from 0.6.0 to 0.7.0 (not using yarn) ¯_(ツ)_/¯

Edit: This came back when the package-lock was modified by someone else on the project so I guess it’s dependent on npm version?

Hmm. Hitting this too, on windows.

Seems like it happens after upgrading beyond 0.2.

I assume this is the

          nodent({
            exclude: 'node_modules/**',
            noRuntime: true,
            promises: true,
            transformations: {
              forOf: false
            },
            parser: {
              plugins: {
                jsx: require('acorn-jsx')
              }
            }
          }),

code.

@edygarOliveira can confirm. The issue is caused by a breaking change in the plugin system for acorn 6. Following the chain of our dependencies the one breaking is the rollup-plugin-nodent which in turn is built on top of nodent. The latter hasn’t been updated to v6 yet.

Created an issue there but it seems like the work required is too much effort and that it won’t be updated anytime soon.

For now it seems like removing nodent from our dependencies sounds like the best option.