Skip to content

Fix #3098 #3274

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Changes from 3 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
4 changes: 3 additions & 1 deletion src/schematics/deploy/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ const spawnAsync = async (
) =>
new Promise<Buffer>((resolve, reject) => {
const [spawnCommand, ...args] = command.split(/\s+/);
options = { ...(options || {}), shell: true };
const spawnProcess = spawn(spawnCommand, args, options);
const chunks: Buffer[] = [];
const errorChunks: Buffer[] = [];
Expand Down Expand Up @@ -313,7 +314,8 @@ export const deployToCloudRun = async (
fsHost.copySync(staticOut, newStaticOut);
fsHost.copySync(serverOut, newServerOut);

const packageJson = getPackageJson(context, workspaceRoot, options, join(serverBuildOptions.outputPath, 'main.js'));
// Target runtime is Linux based.
const packageJson = getPackageJson(context, workspaceRoot, options, [serverBuildOptions.outputPath, 'main.js'].join('/'));
const nodeVersion = packageJson.engines.node;

if (!satisfies(process.versions.node, nodeVersion.toString())) {
Expand Down