Unverified Commit 5d2e2783 authored by OJ Kwon's avatar OJ Kwon Committed by GitHub

fix(next/dev): do not suppress error from bindings (#41989)



## Bug

Minor fix to --turbo to not to suppress errors thrown from bindings.

- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have a helpful link attached, see `contributing.md`

## Feature

- [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR.
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Documentation added
- [ ] Telemetry added. In case of a feature if it's used or not.
- [ ] Errors have a helpful link attached, see `contributing.md`

## Documentation / Examples

- [ ] Make sure the linting passes by running `pnpm lint`
- [ ] The "examples guidelines" are followed from [our contributing doc](https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md)
parent bbe7fddf
...@@ -103,7 +103,7 @@ const nextDev: cliCommand = (argv) => { ...@@ -103,7 +103,7 @@ const nextDev: cliCommand = (argv) => {
if (args['--turbo']) { if (args['--turbo']) {
// check for postcss, babelrc, swc plugins // check for postcss, babelrc, swc plugins
return new Promise(async (resolve) => { return new Promise<void>(async (resolve) => {
const { findConfigPath } = const { findConfigPath } =
require('../lib/find-config') as typeof import('../lib/find-config') require('../lib/find-config') as typeof import('../lib/find-config')
const { loadBindings } = const { loadBindings } =
...@@ -260,7 +260,7 @@ If you cannot make the changes above, but still want to try out\nNext.js v13 wit ...@@ -260,7 +260,7 @@ If you cannot make the changes above, but still want to try out\nNext.js v13 wit
} }
console.log(feedbackMessage) console.log(feedbackMessage)
loadBindings() return loadBindings()
.then((bindings: any) => { .then((bindings: any) => {
// eslint-disable-next-line no-shadow // eslint-disable-next-line no-shadow
const findUp = const findUp =
...@@ -286,7 +286,14 @@ If you cannot make the changes above, but still want to try out\nNext.js v13 wit ...@@ -286,7 +286,14 @@ If you cannot make the changes above, but still want to try out\nNext.js v13 wit
preflight().catch(() => {}) preflight().catch(() => {})
return server return server
}) })
.then(resolve) .then(
() => {
resolve()
},
(err: Error) => {
console.error(err)
}
)
}) })
} else { } else {
startServer(devServerOptions) startServer(devServerOptions)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment