Can't import the named export 'parse' from non EcmaScript module
See original GitHub issueHi @lukeed. First of all, thank you for worktop! Using this feels like a dream compared to what I was putting together before when working with Cloudflare workers.
I was following along this Fauna tutorial and ran into the following issue when running wrangler dev
(and wrangler publish
). I noticed that this error only triggers for v0.7.0 and that using v.0.6.3 does not trigger the error and the project runs fine.
Do you know what the problem might be? I’m not using TypeScript and my node version is v15.2.1. This was a pretty minimal project as described in the tutorial but please let me know if you want me to create a repo that can recreate the error.
👀 ./node_modules/worktop/router/index.mjs 80:36-37
Can't import the named export 'parse' from non EcmaScript module (only default export is available)
at HarmonyImportSpecifierDependency._getErrors (~/Library/Caches/.wrangler/wranglerjs-1.17.0/node_modules/webpack/lib/dependencies/HarmonyImportSpecifierDependency.js:90:6)
...
Edit: Just want to add that I have tried this in another project without faunadb
and worktop
is the only dependency.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Top GitHub Comments
Thank you so much for the quick response @lukeed!
Webpack can be such a pain indeed… I didn’t get that snippet to work immediately but it definitely pointed me to the right direction. I fiddled around with the
resolve
section and gotregexparam
to work but then it started complaining aboutworktop/router
. Eventually I arrived at the following webpack config, which fixed it for me.Back to the fun stuff now. Thanks again!
Awesome, thank you. Now have two snippets I can refer Webpack users to 😉 Thanks!