The requested module is a CommonJS module, which may not support all module.exports as named exports.
@davideast ya está trabajando en esto.
Desde el 11/7/2023.
- #67 de @konstantinblaesi — cerrado sin fusionar
Evaluación
Este issue todavía no se ha evaluado.
Descripción
I have trouble using rxfire with SvelteKit using adapter-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:
import { authState } from "rxfire/auth";
^^^^^^^^^
SyntaxError: Named export 'authState' not found. The requested module 'rxfire/auth' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:
import pkg from 'rxfire/auth';
const { authState } = pkg;
So, I did import * as rxfireauth from "rxfire/auth"; const { authState } = rxfireauth; and...
I got this now:
(node:88773) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
(Use `node --trace-warnings ...` to show where the warning was created)
/Users/scorsi/projects/calicut/front/node_modules/rxfire/auth/index.esm.js:1
import { onAuthStateChanged, onIdTokenChanged, getIdToken } from 'firebase/auth';
^^^^^^
SyntaxError: Cannot use import statement outside a module...
The version installed :
- firebase:
9.6.6 - rxfire:
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):
kit: {
adapter: adapter({fallback: "index.html"}),
prerender: {
enabled: false
},
},
I can create a repro project next week if needed.
- Lenguaje dominante
- TypeScript
- Estrellas
- 150
- Forks
- 50
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de FirebaseExtended/rxfire
-
Dificultad 4/5 3-5 días Aptitud para principiantes 30/100
FirebaseExtended/rxfire#105 ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
FirebaseExtended/rxfire#94 ·
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 35/100
FirebaseExtended/rxfire#90 ·
-
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
FirebaseExtended/rxfire#88 · 10 comentarios · 14 reacciones ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
FirebaseExtended/rxfire#84 · 1 comentario · 2 reacciones ·
Todos los issues de FirebaseExtended/rxfire
Issues similares
-
bug priority: P2
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
wayfinder:task
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
Los mantenedores suelen responder en 1 día
-
bug customer-reported data-plane question Service Attention Storage
Dificultad 2/5 1-3 horas Aptitud para principiantes 69/100
Azure/azure-rest-api-specs#47397 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Claude thinking budget can shrink capped Haiku responses to 2,048 tokensPosiblemente ocupada @DavyMassoneto la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
diegosouzapw/OmniRoute#17109 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
paperclipai/paperclip#16785 ·
Los mantenedores suelen responder en 1 día