diff --git a/packages/@apphosting/adapter-angular/e2e/run-local.ts b/packages/@apphosting/adapter-angular/e2e/run-local.ts index 393ac614..c2bd4611 100644 --- a/packages/@apphosting/adapter-angular/e2e/run-local.ts +++ b/packages/@apphosting/adapter-angular/e2e/run-local.ts @@ -41,13 +41,15 @@ const tests = await Promise.all( stdio: "inherit", shell: true, }); - console.log(`[${runId}] updating angular to next tag`); - console.log(`[${runId}] > npx ng update @angular/cli@next @angular/core@next`); - await promiseSpawn("npx", ["ng", "update", "@angular/cli@next", "@angular/core@next"], { - cwd, - stdio: "inherit", - shell: true, - }); + if (parseInt(process.versions.node.split(".")[0]) > 18) { + console.log(`[${runId}] updating angular to next tag`); + console.log(`[${runId}] > npx ng update @angular/cli@next @angular/core@next`); + await promiseSpawn("npx", ["ng", "update", "@angular/cli@next", "@angular/core@next"], { + cwd, + stdio: "inherit", + shell: true, + }); + } const angularJSON = JSON.parse((await readFile(join(cwd, "angular.json"))).toString()); if (!enableSSR) {