-
Notifications
You must be signed in to change notification settings - Fork 959
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
Version 11.21.0 breaks firebase deploy functions compatibility with pnpm #5448
Comments
This also affects the emulators. If you use pnpm and try to start the emulators on
Perhaps a test case needs to be added to check if all 3 major package managers (npm, pnpm, yarn) work correctly before releases go out? |
Confirmed. Cannot run emulators anymore with firebase-tools v11.21.0 and pnpm v7.25.1. I’m getting the same unexpected error as @evelant. |
Similar problem here, on MacBook M1 macOs Ventura, node 18.13.0, pnpm 7.26, using emulator
In firebase.log:
No problems with 11.20 |
not just deploys, it also breaks emulator support. Current workaround for me is to run If the list of deps is small, it's fine, but large deps become a problem. Best alternative while we wait would be to:
this way we don't have to spend any time for installing, no matter the size I use the following script for symlinking, (because I don't know how to symlink in linux directly) symlink.mjsimport { rm, symlink } from "fs/promises";
import * as path from "path";
import { argv } from "process";
const cwd = process.cwd();
const target = path.join(cwd, argv[2]);
const dest = path.join(cwd, argv[3]);
await rm(dest, { force: true, recursive: true });
await symlink(target, dest); |
Due to the way pnpm resolves packages with peer dependencies, location of the firebase functions sdk package isn't where the CLI expects it to be. We make the logic for finding the binary associated Firebase Functions SDK more robust by checking list of possible paths where it might exist. We also add integration test for pnpm in the functions discovery test. Fixes #5448
Due to the way pnpm resolves packages with peer dependencies, location of the firebase functions sdk package isn't where the CLI expects it to be. We make the logic for finding the binary associated Firebase Functions SDK more robust by checking list of possible paths where it might exist. We also add integration test for pnpm in the functions discovery test. Fixes #5448
@evelant Released today at v11.22.0! |
@taeold Success! 🎉 I can successfully run the emulator and deploy WITHOUT having to install deps inside the Thank you so much for persevering and getting it fixed! 🙏 |
[REQUIRED] Environment info
firebase-tools: 11.21.0
Platform: Windows 11
Node: 18.13.0
[REQUIRED] Test case
https://github.com/YannicEl/firebase_tools_pnpm_bug
[REQUIRED] Steps to reproduce
cd .\functions\
pnpm install
<project_id>
in./functions/package.json
with a valid project id that you have premission to deploypnpm run deploy
this will deploy the function in./functions/src
to the specified firebase project[REQUIRED] Expected behavior
One callable function named
handler
ist deployed to the firebase project.[REQUIRED] Actual behavior
The deploy fails with
In the console:
In the
firebase-debug.log
:When downgrading firebase-tools to the previous version
11.20.0
this works just fine. You can test this in the same repsoirtoy by runningpnpm install [email protected]
in./functions
This might have somthing to do with #5391 but I am not entirly sure.
The text was updated successfully, but these errors were encountered: