Skip to content

Hosting emulator fails because launch cannot find Vite in bin #5705

@baraya

Description

@baraya

[REQUIRED] Environment info

firebase-tools: 11.28.0

Platform: Windows

[REQUIRED] Test case

npm >9
firebase experiments:enable webframeworks
firebase emulators:start

[REQUIRED] Steps to reproduce

  1. Include Vite or other web hosting option
  2. Enable webframeworks option
  3. Start emulators

[REQUIRED] Expected behavior

Vite to start

[REQUIRED] Actual behavior

Error: Could not find the vite executable.

Notes:
package.json does not have an engines.npm definition and npm bin looks to be dropped in v9. Downgrading with npm install -g [email protected] fixed the issue.

https://docs.npmjs.com/cli/v8/commands
https://docs.npmjs.com/cli/v9/commands

const npmBin = spawnSync("npm", ["bin"], { cwd }).stdout?.toString().trim();

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions