Skip to content

Commit

Permalink
fix(next/dev): do not suppress error from bindings (#41989)
Browse files Browse the repository at this point in the history
## 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)
  • Loading branch information
kwonoj committed Oct 27, 2022
1 parent bbe7fdd commit 5d2e278
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions packages/next/cli/next-dev.ts
Expand Up @@ -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<void>(async (resolve) => {
const { findConfigPath } =
require('../lib/find-config') as typeof import('../lib/find-config')
const { loadBindings } =
Expand Down Expand Up @@ -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 =
Expand All @@ -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)
Expand Down

0 comments on commit 5d2e278

Please sign in to comment.