Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

incompatible with pnpm monorepo #470

Open
NullVoxPopuli opened this issue Apr 9, 2022 · 6 comments
Open

incompatible with pnpm monorepo #470

NullVoxPopuli opened this issue Apr 9, 2022 · 6 comments

Comments

@NullVoxPopuli
Copy link

I recently converted a monorepo from yarn to pnpm, and now publishing won't happen.

4:36:23 PM] [semantic-release] [@semantic-release/npm] › ℹ  Verify authentication for registry https://registry.npmjs.org
[4:36:23 PM] [semantic-release] [@semantic-release/npm] › ℹ  Reading npm config from /home/nullvoxpopuli/.npmrc
npm ERR! code ENOWORKSPACES
npm ERR! This command does not support workspaces.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/nullvoxpopuli/.npm/_logs/2022-04-09T20_36_24_000Z-debug-0.log
[4:36:24 PM] [semantic-release] › ✖  Failed step "verifyConditions" of plugin "@semantic-release/npm"
[4:36:24 PM] [semantic-release] › ℹ  Start step "verifyConditions" of plugin "@semantic-release/github"
@browniebroke
Copy link

I have the same error with npm workspaces. The traceback points at this line:

const whoamiResult = execa('npm', ['whoami', '--userconfig', npmrc, '--registry', registry], {

Also, I can reproduce locally by logging in, moving into one of the workspace of the monorepo and running: npm whoami

@browniebroke
Copy link

The command works fine with [email protected] but not with [email protected]

@browniebroke
Copy link

And it seems to be fixed in [email protected] (assume it was part of npm/cli#4479)

@manast
Copy link

manast commented Sep 9, 2022

I also have got this error, is there any workaround for this, can we just force the use of [email protected] on the plugin?

@hongaar
Copy link

hongaar commented Nov 24, 2022

Still have this problem with npm 8.19.2:

node@9a0111889c1a: /workspaces/mokr on main [$]
$ cat .npmrc 
workspaces = true

node@9a0111889c1a: /workspaces/mokr on main [$]
$ npm -v
8.19.2

node@9a0111889c1a: /workspaces/mokr on main [$]
$ npm whoami
npm ERR! code ENOWORKSPACES
npm ERR! This command does not support workspaces.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/node/.npm/_logs/2022-11-24T10_59_40_560Z-debug-0.log

Opened #529 to address this

@jedwards1211
Copy link

jedwards1211 commented Aug 30, 2024

@NullVoxPopuli do you also have the workspaces = true npm config setting like @hongaar? If so you could work around by doing npm config set workspaces=false before running semantic-release, and the title isn't quite right because that setting isn't required for monorepos, it's just an option. I haven't run into this issue on my pnpm monorepos

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

No branches or pull requests

5 participants