silverwolf-x/project / packages /next /src /shared /lib /errors /canary-only-config-error.ts
silverwolf-x's picture
download
raw
700 Bytes
export function isStableBuild() {
return (
!process.env.__NEXT_VERSION?.includes('canary') &&
!process.env.__NEXT_TEST_MODE &&
!process.env.NEXT_PRIVATE_LOCAL_DEV
)
}
export class CanaryOnlyConfigError extends Error {
constructor(arg: { feature: string } | string) {
if (typeof arg === 'object' && 'feature' in arg) {
super(
`The experimental feature "${arg.feature}" can only be enabled when using the latest canary version of Next.js.`
)
} else {
super(arg)
}
// This error is meant to interrupt the server start/build process
// but the stack trace isn't meaningful, as it points to internal code.
this.stack = undefined
}
}

Xet Storage Details

Size:
700 Bytes
·
Xet hash:
360649b2d46bb7eba89ef6a81956334430372a3d73f76ec3d20211411e6ab7c4

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.