From 50878c99645560cc4d5c86ca4817fe738abcf2e1 Mon Sep 17 00:00:00 2001 From: puku0x Date: Sat, 27 May 2023 20:58:24 +0900 Subject: [PATCH] fix(nextjs): fix custom server templates --- .../src/generators/custom-server/files/server/main.ts__tmpl__ | 2 +- .../generators/custom-server/files/tsconfig.server.json__tmpl__ | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/next/src/generators/custom-server/files/server/main.ts__tmpl__ b/packages/next/src/generators/custom-server/files/server/main.ts__tmpl__ index b492e7340b9fd..9fd14335a7fb9 100644 --- a/packages/next/src/generators/custom-server/files/server/main.ts__tmpl__ +++ b/packages/next/src/generators/custom-server/files/server/main.ts__tmpl__ @@ -30,7 +30,7 @@ async function main() { await nextApp.prepare(); const server = createServer((req, res) => { - const parsedUrl = parse(req.url, true); + const parsedUrl = parse(req.url ?? '', true); handle(req, res, parsedUrl); }); diff --git a/packages/next/src/generators/custom-server/files/tsconfig.server.json__tmpl__ b/packages/next/src/generators/custom-server/files/tsconfig.server.json__tmpl__ index 84776020351a9..4214a917d7389 100644 --- a/packages/next/src/generators/custom-server/files/tsconfig.server.json__tmpl__ +++ b/packages/next/src/generators/custom-server/files/tsconfig.server.json__tmpl__ @@ -4,7 +4,7 @@ "module": "commonjs", "noEmit": false, "incremental": true, - "tsBuildInfoFile": "<%= offsetFromRoot %>/tmp/buildcache/<%= projectRoot %>/server", + "tsBuildInfoFile": "<%= offsetFromRoot %>tmp/buildcache/<%= projectRoot %>/server", "types": [ "node" ]