|
const result = execa( |
|
"npm", |
|
["publish", basePath, "--userconfig", npmrc, "--tag", distTag, "--registry", registry], |
|
{ cwd, env, preferLocal: true } |
|
); |
Since npm publish is executed via execa, if @semantic-release/npm is not installed via npx, the npm installed as a dependency may not necessarily be used as described in: semantic-release/semantic-release#3913 semantic-release/semantic-release#3920. Therefore, I suggest checking the npm version at runtime.
I see you have semantic-release and plugins under devDependencies and installing with pnpm, which might be complicating things. Please try removing from devDependencies and just use npx to both install and run
npm/package.json
Line 31 in 14c1fc8
npm/lib/publish.js
Lines 23 to 27 in 14c1fc8
Since
npm publishis executed viaexeca, if@semantic-release/npmis not installed via npx, the npm installed as a dependency may not necessarily be used as described in: semantic-release/semantic-release#3913 semantic-release/semantic-release#3920. Therefore, I suggest checking the npm version at runtime.