-
Notifications
You must be signed in to change notification settings - Fork 116
"name-is-not-exported-by-module" for default export #206
Comments
This is a recurring issue. Take a look at the existing issues to hopefully find a solution. |
So I was able to find this #186, but the suggested answer doesn't work any more:
So I tried "external" in the main options
This does compile, but fails at runtime.
(Note that I had a requirejs available on my page, otherwise I assume the error would be something like Edit: Or just forgo the import completely and just use the |
I found this particular issue, and it proposed changing |
Instead of |
I think It checked whether exporting "default" by AST, switch commonjs-proxy code by with / without "default". Maybe processing cost increase slightly but that way is better. |
Hey folks (this is a canned reply, but we mean it!). Thanks to everyone who participated in this issue. We're getting ready to move this plugin to a new home at https://github.com/rollup/plugins, and we have to do some spring cleaning of the issues to make that happen. We're going to close this one, but it doesn't mean that it's not still valid. We've got some time yet before the move while we resolve pending Pull Requests, so if this issue is still relevant, please @ me and I'll make sure it gets transferred to the new repo. 🍺 |
I'm attempting to use rollup for the first time, and I've encountered errors that look like "Error: 'foo' is not exported by node_modules/fast-json-patch/src/json-patch-duplex.js" a few times. The advice suggested by the error message has generally worked.
https://github.com/rollup/rollup/wiki/Troubleshooting#name-is-not-exported-by-module
However, what do I do when the object I want is the default export from the module? I've tried:
Though I wan't really expecting the above to work (what if the module exported a non-default property called "default"?) and it didn't. I'm not sure what to do.
I'm sorry if this turns out to be a stupid question. All the previous "modern" javascript I've done has been server side. I'm finding all the seemingly countless module systems extremely confusing.
The text was updated successfully, but these errors were encountered: