-
Notifications
You must be signed in to change notification settings - Fork 21
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
Error on import? #151
Comments
Are You trying this without bundling (rollup, webpack,...) ? To import the module natively with node, a recent 12.x or any 14.x node version is required |
I'm trying to import this into a Svelte/Sapper application derived from the rollup template that Sapper provides. I'm calling By copying the actual index.mjs file into my repository and then renaming it to use a .js extension instead of a .mjs extension, the problem goes away and I can use the code, but I had hoped to be able to use it directly after doing a |
My specific node version is 12.17.0 |
I can reproduce the problem with sapper. Looks like sapper has problems with nodes flavor of esm modules |
Same here.
|
The problem is that svelte-websocket-store only works for with ESM not CJS type of modules. |
You can try to import the full path: import websocketStore from "svelte-websocket-store/src/index.mjs"; |
I get the following error when trying to import this module.
I'm not sure what's going on here? I'm using this line in my Sapper route code:
The text was updated successfully, but these errors were encountered: