question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't import the named export 'makeFetchBody' from non EcmaScript module (only default export is available)

See original GitHub issue

It’s me again with a new error

[ error ] ./node_modules/@urql/exchange-multipart-fetch/dist/urql-exchange-multipart-fetch.mjs
[1] Can't import the named export 'makeFetchBody' from non EcmaScript module (only default export is available)
[1] Could not find files for /en/movement/new in .next/build-manifest.json
[1] Could not find files for /en/movement/new in .next/build-manifest.json
[1] ModuleDependencyError: Can't import the named export 'makeFetchBody' from non EcmaScript module (only default export is available)

Versions: “urql”: “1.9.7”, “@urql/exchange-graphcache”: “2.3.5”, “@urql/exchange-multipart-fetch”: “0.1.5”,

(Did a reinstall after the new release of @urql/core)

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:3
  • Comments:22 (13 by maintainers)

github_iconTop GitHub Comments

6reactions
dkozmacommented, Jun 7, 2020

FYI, I kept getting the same issue as @BjoernRave, and not even the upgrade to @urql/core@1.11.4 and @urql/exchange-graphcache@2.3.8 resolved it for me.

However, adding the following to my webpack config seemed to fix the issue:

module: {
  rules: [
    {
      test: /\.mjs$/,
      include: /node_modules/,
      type: 'javascript/auto'
    }
  ]
}
2reactions
OriginalEXEcommented, Apr 22, 2020

The weird thing is that I tried to manually specify the extension, but that did not help.

I will try to create a minimal reproduction, and will open a separate ticket.

Read more comments on GitHub >

github_iconTop 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 'makeFetchBody' from non ...
Can't import the named export 'makeFetchBody' from non EcmaScript module (only default export is available) #732.
Read more >
can't import the named export from non ecmascript module ...
can't import the named export from non ecmascript module (only default export is available). Clear input field icon. Search query. Filter Icon. Recency....
Read more >
"Can't import the named export from non EcmaScript module ...
KJS: "Can't import the named export from non EcmaScript module (only default export is available)" with react-map-gl-draw external interface. Relates to 1.
Read more >
Can't import the named export from non EcmaScript module
Or if anyone is familiar with this issue and has specific advice, that'd be even better. Thanks! Simon. Here's the full build log...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found