-
Notifications
You must be signed in to change notification settings - Fork 917
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Function deployment fails with npm workspaces/nx - Error: spawn ./node_modules/.bin/firebase-functions ENOENT #4952
Comments
I could fix this issue just by downgrading the version of firebase tools to v10.0.0 using: |
Since there might be something wrong with the new v11.8.0, so It would be really awesome if the engineers took a look at what's up with the latest release...so I am keeping this issue open. |
Thanks for filing the issue @rahuld600! QQ1 - what tooling are you using for package management (yarn? npm)? Are you usign yarn/npm workspaces? |
@taeold Hello sir, |
Hey. If I may, what if they weren't using npm but yarn and yarn workspaces? We seem to be having the same issue, only with yarn workspaces and for Would it be better if I created a new issue for this for full details, or is this fine? Here are some of the other relevant(?) packages and versions: |
Hey 👋 I'm seeing a similarish issue with debug output:
I deleted the existing functions as I thought it would have something do with the versioning but no dice. package.json contents:
|
I have this bug on
|
@vevepeter here's a feature request issue for mono-repos - #653 @joonne that's a different error than what the other folks are experiencing, do you mind opening another issue and use the template? thanks @kossnocorp are you also using vanilla npm or another package manager? |
@colerogers I use npm. I found a solution - upgrading from Node v14 to v16 helped to solve the problem. |
This version |
I have the same problem with my Nuxt app.
After that everything works normally. Node v16.18.1 |
Just rolling back to 10.8.0 has solved it for me, lost 2 days of debugging a pipeline haha |
Updating firebase tool from 11.2.2 → 11.17.0 worked for me.. Spend 3 days on this. Randomly break my project due to this |
Hi everyone sorry for the delay, can anyone confirm they are still seeing this exact issue in the latest release (11.18.0)? I'm not able to reproduce this on my end. Thanks |
Definitely got the issue using the latest 11.19.0 Downgrading to 11.17.0 has fixed the issue. |
I'm also seeing the same on 11.19.0 but was working fine on 11.18.0. Also happens when running emulators:start and not just deploy.
Running on v11.19.0 outputs:
So you can see the working version says "Could not parse firebase-functions version '' into semver. Falling back to parseTriggers" which is logged from here Which is only happening when This is the cause of then hitting
|
@taeold Unfortunately it seems your merged fix doesn't fix my deployment. I am using v11.20.0 (which I saw does not contain your changes) so I added them to my deps using patch-package. And here is my command and output: As you can see the other variables are being echoed ( Update: |
Same error in 11.20.0 |
11.20.0 does not contain the fixes merged above. |
We have exactly the same problem, rolled back from @taeold Could you please consider reopening this issue? |
In my case, the deploy works on 11.20.0 version of firebase-tools, but only when I add the --debug flag to the command |
For us we can only deploy on 11.17.0. Please reopen this issue. |
v11.19.0 is the version with the breaking changes. So downgrading to 11.18.0 should be fine. The workaround for now (if possible for your situation) is to cd into the functions dir and run npm/yarn install. However, even with the changes applied to my codebase, this workaround did not work and neither does "normal" deployment commands. So I do believe this issue should be reopened @taeold. Thanks |
We finally shipped 11.21.0 that includes a fix (#5391) that addresses few, common scenarios raised in this issue. I was made aware that there are cases where the proposed fix isn't sufficient (e.g. #5448). I'm working through it. If folks open up a new issues with description/sample of your setup as done in the issue I linked here, I'd really appreciate. Thank you all for your patience. |
@taeold Unfortunately, I'm still getting the same error (Upgraded to 11.21.0, and made sure that's the same version I'm using to start the emulator.) |
Btw I am also not getting any success with the latest version, I am using npm not pnpm so #5448 is not relevant to my case. Btw, this is also now failing when installing functions deps by running |
After upgrading to 11.21.0, I see this error when starting the functions emulator: |
same here, the error appeared after upgrading from is there another way to fix it beside downgrading? |
I can confirm that v11.22.0 fixes this issue as described in #5448 |
As mentionned in #5482, I get following error when using v11.22.0 :
|
We have encountered this issue where randomly we are able to deploy our gen v2 function and randomly fail with Deeper investigation shows the issue is not having the .yaml file which in turn resulted in an http call which I assumes generates that yaml file. that http call has a timeout of 30 sec, if the yaml generation was completed under 30 sec our function would deploy otherwise fail.. attaching code snippet from the firebase-tools@11.24.1 sdk
Would appreciate a quick fix for this issue. |
I started encountering this in a project tonight, even after downgrading to v11.19. I can get it to succeed by commenting out a ton of my code but it consistently hits the error with my full code. |
I faced this issue
on firebase tools version 11.25.3. After downgrading to 10.8.0 I was able to deploy my application to firebase hosting. Thank you @JoeEarly @binodnepali for point out what worked for you. |
@ibnzahoor98 downgrading to such an older version is not really a long term fix imo. Plus this issue has been fixed in v11.22.0 as I outlined above. I'd recommend going back to this version to determine if this issue is the same cause or is a regression since then.
|
Thank you for pointing out. I will move to 11.22.0 |
I have just updated to 11.27.0 and am still seeing this error. |
@Fleker Same for me |
This problem is still happening, downgrading to versions 11.17.0 or 11.22.0 or latest is currently not working for us, can someone please check this? Its a development blocker since deployment is impossible AND emulators won't start. |
[REQUIRED] Environment info
firebase-tools: 11.8.0 (latest release)
Platform: : macOS
[REQUIRED] Test case
If I make a function on the index.js file, and then I try to deploy using:
firebase deploy --only functions:nameOfYourFunction
I get an Unexpected Error at the end.
[REQUIRED] Steps to reproduce
Using npm or whatever package manager you prefer, run these on your terminal,
Now under the functions folder, make sure you have installed node modules using
npm install
,and finally you create a basic function you like on index.js after you are done importing stuffs, for example:
Now when you try to do:
firebase deploy --only functions:yourFunctionName
You'll see this error message in the end:
[REQUIRED] Expected behavior
Expected behaviour is that the function gets deployed successfully without any error.
[REQUIRED] Actual behavior
Actual behaviour is that function normally get's deployed successfully and just after this update, this issue came into play.
The text was updated successfully, but these errors were encountered: