From 8cd5fff2ef3a590abf4f5cce2d3297cf8acf8560 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=96=AD=E5=B4=96=E4=B8=8A=E7=9A=84=E9=A3=8E?= Date: Thu, 19 Aug 2021 15:24:48 +0800 Subject: [PATCH] fix: cli start Error [ERR_STREAM_WRITE_AFTER_END]: write after end Repeatedly call response.end() --- lib/commands/start.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/commands/start.js b/lib/commands/start.js index 31defe4..8717e8d 100644 --- a/lib/commands/start.js +++ b/lib/commands/start.js @@ -71,6 +71,7 @@ module.exports = function (path, configFile, port) { ) { res.writeHead(404) res.end() + return } Promise.resolve(cached.get(req.url) || renderer.renderToString(req.url))