Skip to content

Version 11.21.0 breaks firebase deploy functions compatibility with pnpm  #5448

@YannicEl

Description

@YannicEl

[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

  1. Run cd .\functions\
  2. Run pnpm install
  3. Replace <project_id> in ./functions/package.json with a valid project id that you have premission to deploy
  4. Run pnpm 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:

The system cannot find the path specified.

In the firebase-debug.log:

[debug] [2023-01-21T08:28:14.281Z] Error: spawn C:\Users\bamio\Desktop\firebase_tools_bug\node_modules\.pnpm\[email protected][email protected]\node_modules\.bin\firebase-functions ENOENT
    at notFoundError (C:\Users\bamio\Desktop\firebase_tools_bug\node_modules\.pnpm\[email protected]\node_modules\cross-spawn\lib\enoent.js:6:26)
    at verifyENOENT (C:\Users\bamio\Desktop\firebase_tools_bug\node_modules\.pnpm\[email protected]\node_modules\cross-spawn\lib\enoent.js:40:16)
    at cp.emit (C:\Users\bamio\Desktop\firebase_tools_bug\node_modules\.pnpm\[email protected]\node_modules\cross-spawn\lib\enoent.js:27:25)
    at ChildProcess._handle.onexit (node:internal/child_process:291:12)

When downgrading firebase-tools to the previous version 11.20.0 this works just fine. You can test this in the same repsoirtoy by running pnpm install [email protected] in ./functions

This might have somthing to do with #5391 but I am not entirly sure.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions