-
Notifications
You must be signed in to change notification settings - Fork 115
ERROR: TypeError: google.discoverAPI is not a function on functions start #321
Comments
I'm having exact the same problem after a nvm and node upgrading and reinstalled firebase-tools. @davidwallen have you solved it? |
I had the same earlier today. I solved it by some combination of reinstalling the gcloud sdk, upgrading node, and accepting a pop-up from Mac granting network access to Node (they happened at approximately the same time, so I wasn’t able to narrow it down) |
1.0.0-beta.6.0 released before couple hours ago. after that could not deploy a function to my local project. In workaround I've fixed the issue can not launch functions-emulaor from firebase-tools as bellow: npx functions stop
rm -rf ./node_modules/firebase-tools/node_modules/@google-cloud/functions-emulator
npm i "@google-cloud/functions-emulator"@"1.0.0-beta.5
npx firebase functions:shell |
thanks @laiso, I hope google finds a way to solve this |
@laiso pointed me to the right direction but in my case I had to downgrade a version lower than him. Downgraded to @google-cloud/functions-emulator"@1.0.0-beta.4 and after solving another, unrelated error, it worked. If you downgrade to beta.4 and encounter the "RangeError [ERR_OUT_OF_RANGE]: The value of "value" is out of range. " error, I got it to work applying this hack: Issue #770 |
@laiso recommendation fixed it for me too, but i had to run it in my global npm repository ! :) |
OK. I was able to reproduce this error by following the quickstart in the |
Was using [email protected] but got the same issue with older verions
|
Note that this issue still exists with this GitHub repo. |
@grant I can confirm it works now.
Though not sure why it stuck at |
[2019-04-17T20:11:10.027Z] ---------------------------------------------------------------------- |
@LVeach did you uninstall and install firebase-tools again in the past 2 hours? If not, please try it, as @grant mentioned in #321 (comment) that he unpublished the latest (beta 6, w/ bug) version so you'll have the stable one back now. |
@bluet I thought I had, but I will attempt those steps again! |
@LVeach if you still have the same issue, please paste your steps and the output of |
@bluet Absolutely, I am currently doing a clean install and then will re-apply the steps above and see where it's at |
Same issue with latest commit. On one side we need node 8 to get async/await in our functions code and on the other we cant use node 8 on |
@coulix My projects use node 8 and node 10 in local test environments and they work fine, so don't worry. 😃 At the time you post comment, the latest commit is 098e253, which is before the problem get solved. |
@bluet I am trying nvm current npx functions --version I used
|
1 similar comment
This comment has been minimized.
This comment has been minimized.
@coulix did you try @grant I noticed that |
The beta 6 update just removes the Node 6 warning so the Firebase CLI won't show the warning either. This was a request by the Firebase CLI team. |
Ok I did functions stop, uninstall then installed the pinned beta.5 branch.
|
@coulix can you provide a demo repo to reproduce your issue? I think that would help people on investigating where the problem is. |
I have it here https://github.com/coulix/nuxt2-ssr-firebase
https://nuxt-test-96b4a.firebaseapp.com/
|
@coulix I've checked the repo you provide and followed your steps, it installed 1.0.0-beta.6. You can check it by The reason is, you specified version "dependencies": {
"@google-cloud/functions-emulator": "^1.0.0-beta.5"
} And due to @grant published broken version 1.0.0-beta.6 again (mentioned in #321 (comment) and #321 (comment)), you will get the broken 1.0.0-beta.6 installed in your system. After
And these messages showed when requesting http://localhost:3000/ doesn't belong to cloud-functions-emulator. You should check your nuxt2 project itself.
Because I didn't see anything in that folder.
|
I just realized that what mentioned in #321 (comment) is that the new beta.6 doesn't break things. So it's ok to have beta.6 installed. Sorry for misunderstanding you @grant @coulix I've tested your repo and it seems to be problems with your nuxt project itself. |
@bluet Thank you so much for the investigation! I will pursue this bug onto Nuxt then. |
I'm using beta 6 and have the same error by running Running those 2 commands separately works. |
Hi! I try to debug firestore functions locally and get the same error. (use nvm, windows 10 and example functions "makeUppercase"). `firebase --debug functions:shell [2019-04-26T08:41:30.950Z] > 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"] |
@alex89607 seems like you're not using the latest beta.6 but the previous beta.6. Please try to clean your package caches and install from npmjs again. |
Host: Pixelbook Slate i7 16 GB
Host OS: Google Chrome OS Version 72.0.3626.122 (Official Build) (64-bit)
Container OS: Linux penguin 4.19.4-02480-gd44d301822f0 #1 SMP PREEMPT Thu Dec 6 17:45:27 PST 2018 x86_64 GNU/Linux
Virtual machine info:
node --version: v8.15.1
npm --version: 6.4.1
functions --version: 1.0.0-beta.5
reproduced by: user:~/cloud-functions-emulator$ functions start
output:
The text was updated successfully, but these errors were encountered: