menu
Channels
# All channels
view-forward
# General
view-forward
# Announcements
view-forward
# Feedback
view-forward
# Guides
view-forward
# I Made This
view-forward
Team

Error fixed Firebase

December 7, 2020 at 5:55pm

Error fixed Firebase

December 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 install you should have gotten firebase 7.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 firebase 8.0.
  • reply
  • like

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.
like-fill
1
  • reply
  • like

December 11, 2020 at 12:52am
I've updated Divjoy to now give you firebase 8.1.2 and firebase-admin 9.4.2. It now also gives you an updated src/util/firebase.js that 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 firebase and firebase-admin.
Edited
  • reply
  • like

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
  • reply
  • like
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.
  • reply
  • like
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
  • reply
  • like
searched a lot to find a solution but could not find an appropriate one
  • reply
  • like
Please give this a try:
  • Make sure package.json has the firebase and firebase-admin updated versions specified
  • Delete your node_modules directory
  • Re-run npm install
  • 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]
  • reply
  • like