Skip to content

Commit 8aaed37

Browse files
committed
Remove error
1 parent b8ff4c6 commit 8aaed37

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

Diff for: packages/next/src/server/next-server.ts

-14
Original file line numberDiff line numberDiff line change
@@ -192,20 +192,6 @@ export default class NextNodeServer extends BaseServer<
192192
this.isDev = isDev
193193
this.sriEnabled = Boolean(options.conf.experimental?.sri?.algorithm)
194194

195-
// @ts-expect-error internal field not publicly exposed
196-
const isTurbopackBuild = this.nextConfig.experimental?.isTurbopackBuild
197-
if (!isDev && typeof isTurbopackBuild !== 'undefined') {
198-
if (process.env.TURBOPACK && !isTurbopackBuild) {
199-
throw new Error(
200-
`Invariant: --turbopack is set but the build used Webpack`
201-
)
202-
} else if (!process.env.TURBOPACK && isTurbopackBuild) {
203-
throw new Error(
204-
`Invariant: --turbopack is not set but the build used Turbopack. Add --turbopack to "next start".`
205-
)
206-
}
207-
}
208-
209195
/**
210196
* This sets environment variable to be used at the time of SSR by head.tsx.
211197
* Using this from process.env allows targeting SSR by calling

0 commit comments

Comments
 (0)