Error fixed FirebaseDecember 7, 2020 at 5:55pm
error while npm run dev : Attempted import error: 'apps' is not exported from 'firebase/app' (imported as 'firebase'). Solution : Modify Firebase import line in src/util/firebase.js with : import firebase from 'firebase/app' https://stackoverflow.com/questions/64545862/upgrade-to-firebase-js-8-0-0-attempted-import-error-app-is-not-exported-from
December 8, 2020 at 2:09am
Hey, thanks for letting me know about this! Question: when you first exported from Divjoy and ran
npm installyou should have gotten
firebase7.15.1. Did you manually upgrade to 8.0 or did you somehow get that in your export?
Either way, I'll make sure to apply that fix when I upgrade Divjoy to use
December 9, 2020 at 11:47am
Hey ! I don't know... thanks for the info, i'll try to downgrade eventually cause I have a firebase error in the dev env while trying to access the payement page : 16 UNAUTHENTICATED: Request had invalid authentication credentials. Expected OAuth 2 access token, login cookie or other valid authentication credential. See https://developers.google.com/identity/sign-in/web/devconsole-project.
December 11, 2020 at 12:52am
I've updated Divjoy to now give you
9.4.2. It now also gives you an updated
src/util/firebase.jsthat includes the proper import format (
import firebase from "firebase/app"). That resolves the import issue, like the stackoverflow link suggested. I'm not running into that other error you saw when trying to access the payment page though. Let me know if that's still an issue for you after updating both
December 11, 2020 at 9:27am
Hey Gabe ! Thanks so much for the follow-up :) I don't know what to update for firebase and firebase-admin ... I just know that my import in firebase.js is like this import firebase from "firebase/app"; But I don't know chere to look/update, Cheers
I changed the firebase admin and firebase in package.json When trying to deploy in the terminal with "vercel" i have this message in vercel : npm WARN tarball tarball data for [email protected] seems to be corrupted. Trying one more time. Error: Command "npm install" exited with 1 My questions are :
- I haven't done npm install -g vercel, do i have to do it again before redeploy ?
- looks like the SHA key of firebase is not matching the criteria but i don't know where to change it.
well, i downgraded and know i have this : 400 undefined: Getting metadata from plugin failed with error: invalid_grant: Invalid grant: account not found And found this about the error : https://github.com/googleapis/nodejs-tasks/issues/252
searched a lot to find a solution but could not find an appropriate one
Please give this a try:
- Make sure package.json has the firebase and firebase-admin updated versions specified
- Delete your node_modules directory
- And then try to deploy again
If that doesn't work could you email me the last 50 or lines of output in your terminal so I can get a better sense of what's going on? Send that to [email protected]