Open NullVoxPopuli opened 2 years ago
I have the same error with npm workspaces. The traceback points at this line: https://github.com/semantic-release/npm/blob/4b33e5bc8e051822aa79654e76bdd82c2f0452cd/lib/verify-auth.js#L21
Also, I can reproduce locally by logging in, moving into one of the workspace of the monorepo and running: npm whoami
The command works fine with npm@8.4
but not with npm@8.5
And it seems to be fixed in npm@8.6
(assume it was part of https://github.com/npm/cli/pull/4479)
I also have got this error, is there any workaround for this, can we just force the use of npm@8.6 on the plugin?
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 https://github.com/semantic-release/npm/pull/529 to address this
@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
I recently converted a monorepo from yarn to pnpm, and now publishing won't happen.