Search code examples
npmhttp-status-code-403npm-publish

Publishing scoped package fails with 403


I'm the proud creator of frs-replace package. After some discussions here and there, I've made the decision to move the package under new organisation's scope (frsource).

So, I've created the organization, and my private npm account is marked as its owner. Then, I've changed the name of the package to @frsource/frs-replace and bumped the package's version. The problem is that when trying to publish the package with npm publish --access=public I always get the error:

18 http fetch PUT 403 https://registry.npmjs.org/@frsource%2freplace 1231ms
19 verbose stack Error: 403 Forbidden - PUT https://registry.npmjs.org/@frsource%2freplace - Forbidden

While publishing the old package (linked with the same private account) everything works perfectly fine, so it's not anything connected with login I guess, right? Any ideas what's the problem here?


Solution

  • I've got my question answered on npm CLI github. Long story short: inside my organisation, I've created a team for the package, but I forgot to add myself to this team 🤦‍♂️ After inviting myself to this team, I was finally able to publish my package under organisation scope!