reactfire: SyntaxError: Cannot use import statement outside a module
/Users/sean/GitHub/vap-mono/node_modules/rxfire/auth/index.esm.js:1
import { Observable, from, of } from 'rxjs';
^^^^^^
SyntaxError: Cannot use import statement outside a module
at Object.compileFunction (node:vm:353:18)
at wrapSafe (node:internal/modules/cjs/loader:1039:15)
at Module._compile (node:internal/modules/cjs/loader:1073:27)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1138:10)
at Module.load (node:internal/modules/cjs/loader:989:32)
at Function.Module._load (node:internal/modules/cjs/loader:829:14)
at Module.require (node:internal/modules/cjs/loader:1013:19)
at require (node:internal/modules/cjs/helpers:93:18)
at Object.<anonymous> (/Users/sean/GitHub/vap-mono/node_modules/reactfire/dist/reactfire.cjs.development.js:27:12)
at Module._compile (node:internal/modules/cjs/loader:1109:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1138:10)
at Module.load (node:internal/modules/cjs/loader:989:32)
at Function.Module._load (node:internal/modules/cjs/loader:829:14)
at Module.require (node:internal/modules/cjs/loader:1013:19)
at require (node:internal/modules/cjs/helpers:93:18)
at Object.<anonymous> (/Users/sean/GitHub/vap-mono/node_modules/reactfire/dist/index.js:7:20)
on rc2
any ideas?
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 2
- Comments: 17 (4 by maintainers)
Thanks for trying it out @fabn! I’ve cut a new release candidate
v3.0.0-rc.3that contains this fix.SIDE NOTE: One upside of this bug is that it collected a bunch of Next.js developers 😅. We’d like to better understand how people are using ReactFire with Next.js. If anyone here has a minute to leave your feedback in discussion https://github.com/FirebaseExtended/reactfire/discussions/412, it would be a huge help!
Just tried, seems to work with these packages:
Thanks for the reports! Two workarounds that should work while we investigate FirebaseExtended/rxfire#17. You can either:
reactfire@v3.0.0-rc.0, as @epodol recommendedor
I believe this may be due to https://github.com/FirebaseExtended/rxfire/issues/17.
I got the same error when deploying the application in vercel and
v3.0.0-rc.3fixed it. Thank you! ❤️