Git Product home page Git Product logo

Comments (5)

elnatanitzan avatar elnatanitzan commented on July 16, 2024 1

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.

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.

elnatanitzan avatar elnatanitzan commented on July 16, 2024 1

@luoxufeiyan

Finally after twice I did uinstall and reinstall for versions 8.2, and then npm update Everything works fine for me.
Thanks

from todoapp.

jcardenaslie avatar jcardenaslie commented on July 16, 2024 1

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.

luoxufeiyan avatar luoxufeiyan commented on July 16, 2024

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.

from todoapp.

luoxufeiyan avatar luoxufeiyan commented on July 16, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.