I've seen this a few times now: I run the CLI, it fails. If I run npm whoami then give npx semantic-release-cli setup another time, it works! Not sure what the deal is, as I'm not changing my login status.
First attempt fails:
$ npx semantic-release-cli setup
? What is your npm registry? https://registry.npmjs.org/
? What is your npm username? zeke
ERR! semantic-release Error: Could not login to npm.
ERR! semantic-release at getNpmToken (/usr/local/lib/node_modules/semantic-release-cli/src/lib/npm.js:51:21)
ERR! semantic-release at <anonymous>
ERR! semantic-release at process._tickCallback (internal/process/next_tick.js:188:7)
ERR! semantic-release { Error: Could not login to npm.
ERR! semantic-release at getNpmToken (/usr/local/lib/node_modules/semantic-release-cli/src/lib/npm.js:51:21)
ERR! semantic-release at <anonymous>
ERR! semantic-release at process._tickCallback (internal/process/next_tick.js:188:7)
ERR! semantic-release stack: 'Error: Could not login to npm.\n at getNpmToken (/usr/local/lib/node_modules/semantic-release-cli/src/lib/npm.js:51:21)\n at <anonymous>\n at process._tickCallback (internal/process/next_tick.js:188:7)' }
But I'm logged in to npm:
Second attempt works:
$ npx semantic-release-cli setup
? What is your npm registry? https://registry.npmjs.org/
? What is your npm username? zeke
? What is your GitHub username? zeke
I've seen this a few times now: I run the CLI, it fails. If I run
npm whoamithen givenpx semantic-release-cli setupanother time, it works! Not sure what the deal is, as I'm not changing my login status.First attempt fails:
But I'm logged in to npm:
Second attempt works: