sindresorhus/np







The issue has been solved
"Verify user is authenticated" Credentials Issue #432
colinking posted onGitHub
<!--- Provide a short summary of the issue in the title above -->
Hitting an issue with authentication when trying to publish a private scoped package to npm
.
Running yarn run release
(where "release": "np"
in package.json
):
> yarn run release
yarn run v1.16.0
$ np
Publish a new version of @segment/package-name (current: 1.0.4)
Commits:
- Add np for releasing to npm (#3) 66f0afc
Commit Range:
93f42078aea5ad8114c57c618db33f06c89e4147...master
? Select semver increment or specify new version patch 1.0.5
? This scoped repo @segment/package-name hasn't been published. Do you want to publish it publicly? No
β― Prerequisite check
β Ping npm registry
β Check npm version
β Check yarn version
β Verify user is authenticated
β npm ERR! /Users/colinking/.npm/_logs/2019-06-18T20_37_11_472Z-debug.log
Check git version
Check git remote
Validate version
Check for pre-release version
Check git tag existence
Git
Cleanup
Installing dependencies using Yarn
Running tests using Yarn
Bumping version using Yarn
Publishing package using Yarn
Enabling two-factor authentication
Pushing tags
Creating release draft on GitHub
β Command failed: npm access ls-collaborators @segment/package-name
npm ERR! code E403
npm ERR! 403 Forbidden - GET https://registry.yarnpkg.com/-/package/%40segment%2Fpackage-name/collaborators?format=cli - Forbidden
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/colinking/.npm/_logs/2019-06-18T20_37_11_472Z-debug.log
Publish failed. Rolling back to the previous stateβ¦
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
What's odd is that I am logged in:
> yarn login
yarn login v1.16.0
info npm username: colinking
info npm email: <email>
β¨ Done in 0.06s.
And I'm even able to fetch that collaborators list that is 403-ing:
> npm access ls-collaborators @segment/node-ctlstore
{
// ...
}
And both of the following publish fine:
> ./node_modules/.bin/np
> npm run release
Possibly this is an issue with np
getting auth rights correctly via yarn
?
Expected behavior
Expected to not get a 403 issue from np
. It should have published fine, just like it does when run with npm
instead of yarn
.
Environment
np - 5.0.3 Node.js - v10.15.3 npm - 6.9.0 Git - 2.20.1 OS - macOS 10.14.5