The last release publication failed because of the following:
installing NPM dependencies using Yarn
yarn at "/usr/local/bin/yarn"
/usr/local/bin/yarn --frozen-lockfile
error This project's package.json defines "packageManager": "yarn@4.1.1". However the current global version of Yarn is 1.22.22.
This workflow adjustment ensures that the version of yarn used matches the one highlighted in the packageManager field in package.json.
For this to work:
Changed yarn version in the package.json file, as 4.1.1 does not exist. The latest version on yarn@1 that works correctly with mjs files is 1.22.22.
Globally installed the matching yarn version in the actions workflow to prevent a mismatch.
Added an .nvmrc (node version manager) file and specified that the actions workflow uses it. Some dependencies rely on => 16, so I moved the designated Node version to 20.
Changed the require statements in the .mjs file to import.
Everything now runs correctly, although as I am not authorized it stops right before the publish step as you'd expect 😃
npm notice === Tarball Details ===
npm notice name: @geometricpanda/storybook-addon-badges
npm notice version: 2.0.3--canary.44f10a2.0
npm notice filename: geometricpanda-storybook-addon-badges-2.0.3--canary.44f10a2.0.tgz
npm notice package size: 31.3 kB
npm notice unpacked size: 187.8 kB
npm notice total files: 16
npm notice
npm ERR! code ENEEDAUTH
npm ERR! need auth This command requires you to be logged in to https://registry.yarnpkg.com
npm ERR! need auth You need to authorize this machine using `npm adduser`
The last release publication failed because of the following:
This workflow adjustment ensures that the version of yarn used matches the one highlighted in the
packageManager
field inpackage.json
.For this to work:
package.json
file, as4.1.1
does not exist. The latest version on yarn@1 that works correctly with mjs files is1.22.22
..nvmrc
(node version manager) file and specified that the actions workflow uses it. Some dependencies rely on => 16, so I moved the designated Node version to 20.require
statements in the.mjs
file toimport
.if
logic in the publication workflow as GitHub natively handles this: https://docs.github.com/en/actions/managing-workflow-runs/skipping-workflow-runsEverything now runs correctly, although as I am not authorized it stops right before the publish step as you'd expect 😃