diff --git a/src/NextjsBase.ts b/src/NextjsBase.ts index ae9acaa4..eca0bac6 100644 --- a/src/NextjsBase.ts +++ b/src/NextjsBase.ts @@ -51,7 +51,7 @@ export interface NextjsBaseProps { /** * Optional value used to install NextJS node dependencies. - * It defaults to 'npx --yes open-next@latest build' + * It defaults to 'npx --yes open-next@1 build' */ readonly buildCommand?: string; diff --git a/src/NextjsBuild.ts b/src/NextjsBuild.ts index 31e64291..e5f8f1ab 100644 --- a/src/NextjsBuild.ts +++ b/src/NextjsBuild.ts @@ -100,7 +100,7 @@ export class NextjsBuild extends Construct { }; const buildPath = this.props.buildPath ?? nextjsPath; - const buildCommand = this.props.buildCommand ?? 'npx --yes open-next build'; + const buildCommand = this.props.buildCommand ?? 'npx --yes open-next@1 build'; // run build console.debug(`├ Running "${buildCommand}" in`, buildPath); const cmdParts = buildCommand.split(/\s+/);