Can't import the named export 'URL' from non EcmaScript module (only default export is available)
See original GitHub issueBug report
- I’ve updated both my project and my packages to the latest Frontity versions: https://docs.frontity.org/guides/keep-frontity-updated
- I’ve searched for existing issues.
- I’ve checked the documentation: https://docs.frontity.org
- I’ve checked the community forum: https://community.frontity.org
Expected behavior Should have installed all the dependencies
Observed behavior
Frontity fails to install upon running npx frontitty dev
Steps involved to reproduce the problem
- Use
npx frontity create my-app
cd my-app
npx frontity dev
ERROR in ./node_modules/node-fetch/lib/index.mjs 1157:18-21 Can't import the named export 'URL' from non EcmaScript module (only default export is available) @ ./node_modules/frontity/dist/src/index.js @ ./node_modules/@frontity/tiny-router/src/actions.ts @ ./node_modules/@frontity/tiny-router/src/index.ts @ ./build/bundling/entry-points/server.ts
Info about your system
System:
- OS: Windows 10 10.0.19043
- CPU: (8) x64 Intel® Core™ i5-8300H CPU @ 2.30GHz
- Memory: 5.47 GB / 15.85 GB
Binaries:
- Node: 14.17.6 - C:\Program Files\nodejs\node.EXE
- npm: 7.5.2 - C:\Program Files\nodejs\npm.CMD
Browsers:
- Chrome: Not Found
- Edge: Spartan (44.19041.1023.0), Chromium (93.0.961.52)
- Internet Explorer: 11.0.19041.1202
npmPackages:
- @frontity/core: ^1.14.3 => 1.14.3
- @frontity/html2react: ^1.7.0 => 1.7.0
- @frontity/mars-theme: ./packages/mars-theme => 1.6.1
- @frontity/tiny-router: ^1.4.4 => 1.4.4
- @frontity/wp-source: ^1.11.5 => 1.11.5
- frontity: ^1.17.0 => 1.17.0
npmGlobalPackages:
- frontity: Not Found
- npx: Not Found
Possible solution
Issue Analytics
- State:
- Created 2 years ago
- Comments:13 (6 by maintainers)
Top Results From Across the Web
Can't import the named export XXXX from non EcmaScript ...
the solution is to make sure that you have a webpack.config.js file in the root of your project directory that looks something like...
Read more >Can't import the named export from non EcmaScript ... - GitHub
mjs Can't import the named export 'set' from non EcmaScript module (only default export is available) error in ./node_modules/pinia/dist/pinia.
Read more >can't import the named export from non ecmascript ... - You.com
Can't import the named export 'Component' from non EcmaScript module (only default export is available) thebuilder/react-intersection-observer#560. Display more ...
Read more >webpack/webpack - Gitter
Can't import the named export 'a' from non EcmaScript module (only default export is available) ERROR in ./node_modules/@ionic/core/dist/esm/loader.mjs 7:4- ...
Read more >Can't import the named export 'URL' from non EcmaScript ...
Can't import the named export 'URL' from non EcmaScript module (only default export is available). Why would that happen?
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
This is already done 🙂 The issue should be solved now.
Issues are closed once a fix is merged to the base branch. After that, you need to wait for the next release, which @santosguillamot started 1 hour ago: https://github.com/frontity/frontity/pull/871