Skip to content

Commit

Permalink
Improve Node.js version warning for standalone. Fix #2791.
Browse files Browse the repository at this point in the history
  • Loading branch information
yuchenshi committed May 24, 2022
1 parent c3ecb83 commit 07ad42c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/emulator/functionsEmulator.ts
Expand Up @@ -1014,6 +1014,16 @@ export class FunctionsEmulator implements EmulatorInstance {
);
} else {
// Otherwise we'll warn and use the version that is currently running this process.
if (process.env.FIREPIT_VERSION) {
this.logger.log(
"WARN",
`You've requested "node" version "${requestedMajorVersion}", but the standalone Firebase CLI comes with bundled Node "${hostMajorVersion}".`
);
this.logger.log(
"INFO",
`To use a different Node.js version, consider removing the standalone Firebase CLI and switching to "firebase-tools" on npm.`
);
}
this.logger.log(
"WARN",
`Your requested "node" version "${requestedMajorVersion}" doesn't match your global version "${hostMajorVersion}". Using node@${hostMajorVersion} from host.`
Expand Down

0 comments on commit 07ad42c

Please sign in to comment.