-
Notifications
You must be signed in to change notification settings - Fork 463
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't import the named export '...' from non EcmaScript module (only default export is available) #1574
Comments
I assume this is an issue with the build tool you're using. These imports are from the |
its good ol' webpack (v4.18.1) basically. do i need to do some additional configuration I wonder. |
0no-co/wonka#97 i found this but i switched to node 12.14.1 and still nothing get the same compile error. I also tried commenting out most of my vue.config.js (which you can use to manipulate webpack) and the result is the same. |
Would you mind trying to add this as a plugin: https://github.com/lukeed/webpack-modules that way we can see where your issue actually comes from. It could be that your resolve.extensions config is set to not accept (example) - Set a loader for mjs: https://github.com/JoviDeCroock/POC-ModularLegacyBuild/blob/master/webpack.config.js#L80 |
I dont want celebrate yet but: vuejs/vue-cli#2626
and stuff seems to be compiling now :D Let me just check if I can ping my graphQL server and I will close the issue still today if this fixes the problem. Thank you so much! There are so many moving parts I had a hard time understanding wtf was even going on! |
Its working. Just have to fight CORS but at least the requests are happening. |
For those of you that have this error, add this to your webpack config rules, no matter the webpack version to fix it: {
test: /\.mjsx?$/,
include: /node_modules/,
type: 'javascript/auto',
} It worked for me! |
I am trying to use @urql/core library only on a SPA created using vue-service-cli.
I am using urql version 2.0.0 and graphql version 15.5.0
I have tried with node 12 and node 14 and the result is the same:
Steps to reproduce
This is part of my main.js file which is the first thing that is loaded after running npm run serve (which calls vue-cli-service serve)
Expected behavior
I expected my app to run but instead I got
Actual behavior
I must be doing something horribly wrong that is simple to fix. Right?
Here is part of package-json for reference:
The text was updated successfully, but these errors were encountered: