Skip to content

Conversation

bgc-gustavo-vieira
Copy link

@bgc-gustavo-vieira bgc-gustavo-vieira commented Feb 14, 2025

I experienced an issue using this plugin with semantic-release-monorepo.
When I define the pkfRoot, even though everything is set correctly, the npm cli do not attempt to publish the folder in pkgRoot prop, but the root of the package instead.

ExecaError: Command failed with exit code 1: npm publish /home/runner/work/bgc-packages/bgc-packages/packages/value-objects/dist --userconfig /tmp/bcb7296253aa364112caea30f087dbce/.npmrc --tag SUS2089 --registry 'https://registry.npmjs.org/'

As the error above shows, The path is correct at the dist folder, but the npm cli reads from the folder value-objects, instead of value-objects/dist.
So I read this plugin trying to understand why the prepare command works fine and the publish not, and I found that in prepare command we change de cwd while the publish command we assign the npm cli this responsibility.

This PR changes this. Both commands will now point the current working directory to the path that was given by the config file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant