Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
- Fix bug where Custom Event channels weren't automatically crated on function deploys (#5700)
- Lift GCF 2nd gen naming restrictions (#5690)
- Fixes a bug where `ext:install` and `ext:configure` would error on extensions with no params.
- Fixed an issue with Vite and Angular integrations using a obsolete NPM command (#5710)
6 changes: 3 additions & 3 deletions src/frameworks/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,11 +247,11 @@ function scanDependencyTree(searchingFor: string, dependencies = {}): any {

export function getNodeModuleBin(name: string, cwd: string) {
const cantFindExecutable = new FirebaseError(`Could not find the ${name} executable.`);
const npmBin = spawnSync("npm", ["bin"], { cwd }).stdout?.toString().trim();
if (!npmBin) {
const npmRoot = spawnSync("npm", ["root"], { cwd }).stdout?.toString().trim();
if (!npmRoot) {
throw cantFindExecutable;
}
const path = join(npmBin, name);
const path = join(npmRoot, ".bin", name);
if (!fileExistsSync(path)) {
throw cantFindExecutable;
}
Expand Down