Skip to content

Commit 73acea7

Browse files
fix(schematics): use a POSIX path for the Cloud Run main.js entry (#3274)
Running ng deploy from Windows with the Cloud Run SSR option wrote the generated run/package.json entry paths with backslashes, which the Linux-based Cloud Run runtime cannot resolve. The manifest path is now built with forward slashes explicitly, since the target runtime is Linux regardless of the deploying machine. Fixes #3098 Co-authored-by: Armando Navarro <adnavarro@google.com>
1 parent e410e5a commit 73acea7

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/schematics/deploy/actions.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,8 @@ export const deployToCloudRun = async (
426426
fsHost.copySync(staticOut, newStaticOut);
427427
fsHost.copySync(serverOut, newServerOut);
428428

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

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

0 commit comments

Comments
 (0)