-
Notifications
You must be signed in to change notification settings - Fork 44
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
The requested module is a CommonJS module, which may not support all module.exports as named exports. #52
Comments
Hey @scorsi! If you could create a small MVCE (minimal, complete and verifiable example) that would be super helpful for debugging purposes. I'm a big SvelteKit fan, so I'm happy to make sure it's a smooth ride. |
I have the same issue @scorsi Edit: |
@davideast to replicate:
|
I've got the exact same issue (rxfire being cjs) trying to use adapter-node with current sveltekit in order to prepare an app I'd like to host on firebase. |
@fishsticks89 thanks for the repro steps !! |
Any updates around this? I was converting to a sveltkit project and am currently running into this problem as well |
Me too :( |
This is quite a bummer and I have no idea what causes this :( |
Quick fix: Modify node_modules/rxfire/auth/package.json to look like this {
"name": "rxfire/auth",
"browser": "index.esm.js",
"main": "index.cjs.js",
"module": "index.esm.js",
"typings": "index.d.ts",
"sideEffects": false,
"type": "module",
"exports": {
"import": "./index.esm.js",
"require": "./index.cjs.js"
}
} Added content "type": "module",
"exports": {
"import": "./index.esm.js",
"require": "./index.cjs.js"
} This obviously gets overwritten when changing dependencies, so it's not a practical solution. Similar issue discussed by SvelteKit maintainers |
I have trouble using
rxfire
withSvelteKit
usingadapter-static
. When running in dev mode I don't have any issue but when building my app I go troubles...First, I import the
auth
package like that :import { authState } from "rxfire/auth";
.Which gaves me:
So, I did
import * as rxfireauth from "rxfire/auth"; const { authState } = rxfireauth;
and...I got this now:
The version installed :
9.6.6
6.0.3
This may be related to #48 but I don't technically use SSR at all :)
Temporary workaround: disabling page prerendering in
svelte.config.js
(but I lose all interests of using SvelteKit lol):I can create a repro project next week if needed.
The text was updated successfully, but these errors were encountered: