diff --git a/.changeset/chilly-lines-thank.md b/.changeset/chilly-lines-thank.md new file mode 100644 index 000000000..1a0073f29 --- /dev/null +++ b/.changeset/chilly-lines-thank.md @@ -0,0 +1,7 @@ +--- +"@opennextjs/aws": patch +--- + +fix(ci): pin npm@11.5.1 to fix pre-release workflow + +`npm install -g npm@latest` fails on Node 22 with "Cannot find module 'promise-retry'". diff --git a/.github/actions/setup/action.yml b/.github/actions/setup/action.yml index 3975236ea..884ebe1f4 100644 --- a/.github/actions/setup/action.yml +++ b/.github/actions/setup/action.yml @@ -20,9 +20,13 @@ runs: # Ensure npm 11.5.1 or later is installed # See https://docs.npmjs.com/trusted-publishers # Note that pnpm publish runs npm publish + # + # Pinned to 11.5.1 because `npm install -g npm@latest` fails on Node 22 + # with "Cannot find module 'promise-retry'" (npm self-upgrade incompatibility). + # TODO: Update node-version to 24 in pre-release.yml instead. - name: Update npm shell: bash - run: npm install -g npm@latest + run: npm install -g npm@11.5.1 # Install pnpm. https://github.com/pnpm/action-setup - uses: pnpm/action-setup@v4