From 6b11595167d13a96ce6b479324564d6b8dee2a04 Mon Sep 17 00:00:00 2001 From: OJ Kwon Date: Thu, 27 Oct 2022 09:12:01 -0700 Subject: [PATCH] fix(next/dev): do not suppress error from bindings --- packages/next/cli/next-dev.ts | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/packages/next/cli/next-dev.ts b/packages/next/cli/next-dev.ts index 7a5f882148eb6..12ea4388c7fe3 100755 --- a/packages/next/cli/next-dev.ts +++ b/packages/next/cli/next-dev.ts @@ -103,7 +103,7 @@ const nextDev: cliCommand = (argv) => { if (args['--turbo']) { // check for postcss, babelrc, swc plugins - return new Promise(async (resolve) => { + return new Promise(async (resolve) => { const { findConfigPath } = require('../lib/find-config') as typeof import('../lib/find-config') const { loadBindings } = @@ -260,7 +260,7 @@ If you cannot make the changes above, but still want to try out\nNext.js v13 wit } console.log(feedbackMessage) - loadBindings() + return loadBindings() .then((bindings: any) => { // eslint-disable-next-line no-shadow const findUp = @@ -286,7 +286,14 @@ If you cannot make the changes above, but still want to try out\nNext.js v13 wit preflight().catch(() => {}) return server }) - .then(resolve) + .then( + () => { + resolve() + }, + (err: Error) => { + console.error(err) + } + ) }) } else { startServer(devServerOptions)