Closed mirkolenz closed 9 months ago
+1 ran into the same error after setting semantic-release to v22 with the action on v4
@travi Thank you, I just tested the new version in my CI pipeline and it works just as expected! Shall we leave the issue open to track the upcoming API changes (https://github.com/semantic-release/semantic-release/issues/2978) or close it for now?
Currently running stably, temporarily closed.
Describe the bug
When using
v4
of this action withv22
of semantic-release, I get the following error:Error [ERR_PACKAGE_PATH_NOT_EXPORTED]: Package subpath './package.json' is not defined by "exports" in /home/runner/work/_actions/cycjimmy/semantic-release-action/v4/node_modules/semantic-release/package.json
I found out that in
v21
, semantic-release used the attributemain
in itspackage.json
, but as ofv22
has switched to the more modernexports
attribute. It seems that the following snippet (maybe others as well?) is incompatible with this change: https://github.com/cycjimmy/semantic-release-action/blob/a8347177c7985e6a60e9997c6c8cbbebf1c6ff63/src/handleOptions.js#L17Example Workflow
https://github.com/recap-utr/arg-services/blob/main/.github/workflows/release.yml
Additional Context There is an open issue in the repo of semantic-release about the change from
main
toexports
: https://github.com/semantic-release/semantic-release/issues/2968