You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Any version after 11.17.0 fails to deploy (Failed to find location of Firebase Functions SDK) #5822
If i try to use any versions after firebase-tools 11.17.0, i get "Failed to find location of Firebase Functions SDK" error. I have also tried the latest firebase-tools 12.0.0, and i get the same error. I have tried to uninstall and install firebase-tools again. Using pnpm and global. firebase deploy --only functions pnpm firebase deploy --only functions
But get the same error.
[REQUIRED] Version info
node: 18.14.2
firebase-functions: 4.4.0
firebase-tools: 11.17.0
firebase-admin: 11.8.0
os: Windows 11 Pro, 22H2, 22621.1105
[REQUIRED] Steps to reproduce
Deploy any function using firebase deploy --only functions
Were you able to successfully deploy your functions?
No. I get this error
i deploying functions
i functions: preparing codebase default for deployment
i functions: ensuring required API cloudfunctions.googleapis.com is enabled...
i functions: ensuring required API cloudbuild.googleapis.com is enabled...
i artifactregistry: ensuring required API artifactregistry.googleapis.com is enabled...
+ artifactregistry: required API artifactregistry.googleapis.com is enabled
+ functions: required API cloudbuild.googleapis.com is enabled
+ functions: required API cloudfunctions.googleapis.com is enabled
Error: Failed to find location of Firebase Functions SDK. Please file a bug on Github (https://github.com/firebase/firebase-tools/).
Hi @snorreks, I am unable to replicate the issue you mentioned. I tried creating a new project to deploy functions and I did not encounter any issues while deploying. I’m not sure if I may be missing something to properly replicate this. Could you provide more details on how you set up your project, and if you’re able to reproduce the issue in a fresh project? Thanks!
I’m using the following to replicate this issue:
platform: macOS
firebase-tools: v12.0.0
node: v18.15.0
firebase-admin: 11.8.0
firebase-functions: 4.4.0
Hi @snorreks this issue with monorepos and pnpm has been around for a while (here's a large feature request thread on it: #653). We recently patched the discovery process to try and support some pnpm setup (see: #5517). Here's where we check for your firebase-functions binary in code:
I see, it worked when you changed firebase-tools to 12.0.0, and ran pnpm i? Are you using windows?
It is not possible to move around the repo structure. I am using nx, pnpm and nx-cloud-functions-deployer, it is working with firebase-tools 11.17.0 and lower.
Do you think a quick fix is to create npm package wrapper:
Hey @snorreks. We need more information to resolve this issue but there hasn't been an update in 7 weekdays. I'm marking the issue as stale and if there are no new updates in the next 3 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
Activity
aalej commentedon May 10, 2023
Hi @snorreks, I am unable to replicate the issue you mentioned. I tried creating a new project to deploy functions and I did not encounter any issues while deploying. I’m not sure if I may be missing something to properly replicate this. Could you provide more details on how you set up your project, and if you’re able to reproduce the issue in a fresh project? Thanks!
I’m using the following to replicate this issue:
platform: macOS
firebase-tools: v12.0.0
node: v18.15.0
firebase-admin: 11.8.0
firebase-functions: 4.4.0
snorreks commentedon May 11, 2023
I have created a minimal example using pnpm and esbuild, it looks like that pnpm was the issue after all.
https://github.com/snorreks/firebase-tools-pnpm-sdk-location-bug
colerogers commentedon May 11, 2023
Hi @snorreks this issue with monorepos and pnpm has been around for a while (here's a large feature request thread on it: #653). We recently patched the discovery process to try and support some pnpm setup (see: #5517). Here's where we check for your firebase-functions binary in code:
firebase-tools/src/deploy/functions/runtimes/node/index.ts
Line 175 in 2e84e94
Would it be possible to move around your repo structure?
colerogers commentedon May 11, 2023
Also, I tried out the sample and I'm also unable to reproduce the bug
snorreks commentedon May 12, 2023
I see, it worked when you changed firebase-tools to 12.0.0, and ran
pnpm i? Are you using windows?It is not possible to move around the repo structure. I am using nx, pnpm and nx-cloud-functions-deployer, it is working with firebase-tools 11.17.0 and lower.
Do you think a quick fix is to create npm package wrapper:
where npm package layer only have firebase-functions installed?
Do you know if /src/deploy/functions/runtimes/node/index.ts changed after 11.17.0?
russellwheatley commentedon Nov 10, 2023
Hey @snorreks - did you manage to resolve your issue?
google-oss-bot commentedon Nov 21, 2023
Hey @snorreks. We need more information to resolve this issue but there hasn't been an update in 7 weekdays. I'm marking the issue as stale and if there are no new updates in the next 3 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
google-oss-bot commentedon Nov 24, 2023
Since there haven't been any recent updates here, I am going to close this issue.
@snorreks if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.