Error: 'h' is not exported by node_modules/preact/dist/preact.umd.js
See original GitHub issueHello,
We’re using Rollup with our preact application, however since the release of Preact 8.5.0 we receive the following error when building with rollup:
[!] Error: 'h' is not exported by node_modules/preact/dist/preact.umd.js
https://rollupjs.org/guide/en/#error-name-is-not-exported-by-module
src/Components/UI/index.tsx (1:20)
1: import { Component, h } from 'preact';
When we pin to 8.4.2 the build completes successfully. Looking at the comparison here I cannot see anything that could introduce breaking changes.
Kind regards,
Nathan
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Rollup Error: 'default' is not exported by node_modules/react ...
js but I have trouble regarding the plugin @rollup/plugin-commonjs. My rollup.conf.js. import resolve from '@rollup/plugin-node-resolve'; ...
Read more >Bundling Your JavaScript Library with Rollup | Risan Bagja
Error : 'default' is not exported by node_modules/lodash/random.js https://rollupjs.org/guide/en#error-name-is-not-exported-by-module- src/food.
Read more >The "DxButtonModule is not exported by node_modules ...
The "DxButtonModule is not exported by node_modules\devextreme-angular\index.js" error occurs if ng-packagr is used.
Read more >TypeScript errors and how to fix them
When you are importing a module with built-in TypeScript declarations and TypeScript tells you that this module does not have a default export, ......
Read more >Common Error Details - Snowpack
Uncaught SyntaxError: The requested module './XXXXXX.js' does not provide an export named 'YYYYYY'#. If you are using TypeScript, this error could occur if...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @preeny95 - it seems like your Rollup may be configured to look for a
"browser"
field inpackage.json
, but not to actually handle the contents it points to. The"browser"
field can never point to an ES Modules build.Are you able to post your Rollup configuration? If not, what we’re looking for is where you’ve done something like:
Instead, you’ll want to do this:
🎉 that’s done the trick it seems! Thank you!!