firebase-tools: Error: An unexpected error has occurred. • TypeError: Cannot read property 'wanted' of undefined

firebase-tools: 7.0.2

Platform: macOS

Deploying a website to firebase hosting stopped working.

firebase deploy --only hosting

Hosting successful.

Hosting fails.

[2019-07-04T15:46:39.915Z] ---------------------------------------------------------------------- [2019-07-04T15:46:39.918Z] Command: /Users/Azlan_Mac/.nvm/versions/node/v12.3.1/bin/node /Users/Azlan_Mac/.nvm/versions/node/v12.3.1/bin/firebase deploy --only hosting --debug [2019-07-04T15:46:39.918Z] CLI Version: 7.0.2 [2019-07-04T15:46:39.918Z] Platform: darwin [2019-07-04T15:46:39.918Z] Node Version: v12.3.1 [2019-07-04T15:46:39.919Z] Time: Thu Jul 04 2019 23:46:39 GMT+0800 (Malaysia Time) [2019-07-04T15:46:39.919Z] ----------------------------------------------------------------------

[2019-07-04T15:46:39.928Z] > command requires scopes: [“email”,“openid”,“https://www.googleapis.com/auth/cloudplatformprojects.readonly",“https://www.googleapis.com/auth/firebase”,"https://www.googleapis.com/auth/cloud-platform”] [2019-07-04T15:46:39.928Z] > authorizing via signed-in user [2019-07-04T15:46:39.929Z] [iam] checking project mydaypwaapp for permissions [“firebase.projects.get”,“firebasehosting.sites.update”] [2019-07-04T15:46:39.930Z] >>> HTTP REQUEST POST https://cloudresourcemanager.googleapis.com/v1/projects/mydaypwaapp:testIamPermissions
permissions=[firebase.projects.get, firebasehosting.sites.update] [2019-07-04T15:46:41.155Z] <<< HTTP RESPONSE 200 content-type=application/json; charset=UTF-8, vary=X-Origin, Referer, Origin,Accept-Encoding, date=Thu, 04 Jul 2019 15:46:41 GMT, server=ESF, cache-control=private, x-xss-protection=0, x-frame-options=SAMEORIGIN, x-content-type-options=nosniff, server-timing=gfet4t7; dur=1100, alt-svc=quic=“:443”; ma=2592000; v=“46,43,39”, accept-ranges=none, transfer-encoding=chunked [2019-07-04T15:46:41.157Z] >>> HTTP REQUEST GET https://firebase.googleapis.com/v1beta1/projects/mydaypwaapp

[2019-07-04T15:46:41.471Z] <<< HTTP RESPONSE 200 content-type=application/json; charset=UTF-8, vary=X-Origin, Referer, Origin,Accept-Encoding, date=Thu, 04 Jul 2019 15:46:41 GMT, server=ESF, cache-control=private, x-xss-protection=0, x-frame-options=SAMEORIGIN, x-content-type-options=nosniff, alt-svc=quic=“:443”; ma=2592000; v=“46,43,39”, accept-ranges=none, transfer-encoding=chunked [2019-07-04T15:46:42.874Z] TypeError: Cannot read property ‘wanted’ of undefined at /Users/Azlan_Mac/.nvm/versions/node/v12.3.1/lib/node_modules/firebase-tools/lib/checkFirebaseSDKVersion.js:37:51 at processTicksAndRejections (internal/process/task_queues.js:89:5)

Error: An unexpected error has occurred.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 11
  • Comments: 26 (8 by maintainers)

Commits related to this issue

Most upvoted comments

@prescottpure After some guidance from firebase support - we identified that npm 6.10 was causing this issue for me. Downgrading to 6.9.2 fixed it for me. Maybe that’s the same for you?

@mazlano27 that did the trick, thanks for posting! @brunovig you should give that a try (npm i -g npm@6.9.2)

This has been mitigated in 7.1.0.

@prescottprue works for me as well. Thanks.

Life saver @mazlano27

Also seeing this issue when trying to deploy cloud functions. I believe this is the line causing the issue