GraphQL Errors: Can't reexport the named export 'BREAK' from non EcmaScript module (only default export is available)

I’ve never had an error like this before… does anyone know how to fix this?

What file is giving you this error? Can you give us the full filepath and also show what the file looks like?
What steps did you take before getting this error?

If you could provide a little more context I’m sure someone here has some ideas how to troubleshoot further :slight_smile:

../node_modules/graphql/index.mjs 42:0-48:205Can't reexport the named export 'BREAK' from non EcmaScript module (only default export is available)

All i had done was create an apollo schema in the frontend

I can confirm that it has nothing to do with the gql imports. Maybe it has something to do with Webpack?

Thanks for getting back with more details :slight_smile:

I’m afraid I don’t have any good guesses as to what might be wrong. Hopefully someone else can chime in

You may already seen this:

Did you add some to your web/config/webpack.config.js?

or this

Had the same issue, but I didn't want to mess with webpack config. My fix was to change imports.

-import { print } from 'graphql';
+import { print } from 'graphql/language/printer';

I figured out what the issue is, and i can only say I’m more confused than before.
It’s webpack, not detecting .mjs files. A patch was released for this a year ago, but for some reason my file doesnt have that config. Does anyone know how to edit a webpack file and add that in? I have no personal experience with it.

Also just realized… I don’t have a webpack file in my web config.