Skip to content

Commit

Permalink
fix: pin major version of open-next to 1 (#127)
Browse files Browse the repository at this point in the history
Currently, `cdk-nextjs` is not compatible with the latest v2+ version of `open-next`. Work is being done to update the project to be compatible, but for now we'll make sure new users coming to `cdk-nextjs` for the first time are to deploy a working Next.js site.

see: #126

Co-authored-by: Kevin Mitchell <>
  • Loading branch information
kevin-mitchell authored Jul 31, 2023
1 parent 2bf3c44 commit c903c91
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/NextjsBase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/NextjsBuild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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+/);
Expand Down

0 comments on commit c903c91

Please sign in to comment.