Comments (5)
Please check your firebase version to see whether you are using Firebase v9, the new version has some syntax breaking change than v8. This may caused the package not exported issue.
$ firebase --versionI guess this tutorial use firebase v8, you can install this version by following command:
$ npm install -g [email protected] $ npm i [email protected]Or if you prefer to use firebase v9, please refer the breaking changes below and change the tutorial code on your own.
hi,
I did what you said and installed firebase 8.2.3 and firebase-tool 8.20 and now I get another error:
TypeError: Cannot read property 'INTERNAL' of undefined
at Ke (C:\Users\elnatan_nitzan\Desktop\react\todos-app-firebase\node_modules@firebase\auth\dist\auth.js:125:129)
at new Ze (C:\Users\elnatan_nitzan\Desktop\react\todos-app-firebase\node_modules@firebase\auth\dist\auth.js:131:288)
at C:\Users\elnatan_nitzan\Desktop\react\todos-app-firebase\node_modules@firebase\auth\dist\auth.js:237:277
at Object. (C:\Users\elnatan_nitzan\Desktop\react\todos-app-firebase\node_modules@firebase\auth\dist\auth.js:433:462)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:94:18)
! We were unable to load your functions code. (see above)
from todoapp.
Finally after twice I did uinstall and reinstall for versions 8.2, and then npm update
Everything works fine for me.
Thanks
from todoapp.
you can use
const firebase = require('firebase/compat/app');
to use newer versions of firebase and being compatible with old ones too :)
Also having imported:
require('firebase/compat/auth')
you must replace all lines where you use:
firebase.auth()...
for
const auth = firebase.auth()
in order to have something like this:
auth.signInWithEmailAndPassword(user.email, user.password) ...
from todoapp.
Please check your firebase version to see whether you are using Firebase v9, the new version has some syntax breaking change than v8. This may caused the package not exported issue.
$ firebase --version
I guess this tutorial use firebase v8, you can install this version by following command:
$ npm install -g [email protected]
$ npm i [email protected]
Or if you prefer to use firebase v9, please refer the breaking changes below and change the tutorial code on your own.
- https://firebase.google.com/docs/web/modular-upgrade
- https://firebase.google.com/support/release-notes/js#version_800_-_october_26_2020
from todoapp.
Hi @elnatanitzan,
What's your firebase-admin
package version? I'm using 8.10.0
and it works for me.
from todoapp.
Related Issues (14)
- General Enquiry
- is firebase use is paid plan. HOT 1
- Using both Firebase and Firebase ADMIN sdk in functions HOT 1
- Error: Your API key is invalid, please check you have copied it correctly. HOT 1
- Avoid token expiration
- Firebase Firestore empty result HOT 1
- Error: Request failed with status code 500
- How to deploy it? HOT 3
- I got an error "Failed to compile" Module not found HOT 1
- Error: Your API key is invalid, after creating User Login API HOT 1
- Getting 404 POST http://localhost:3000/api/login 404 (Not Found) HOT 5
- Enable repository discussions HOT 2
- Firebase : Cannot find module https: any ideas
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from todoapp.