Unable to publish new scoped package


(Abadi Kurniawan) #1

I’m trying to publish a new scoped package to my organization, but I’m getting this error message:

npm ERR! publish Failed PUT 404
npm ERR! code E404
npm ERR! 404 Scope not found : @abadi99/ng-remotedata
npm ERR! 404 
npm ERR! 404  '@abadi99/ng-remotedata' is not in the npm registry.
npm ERR! 404 You should bug the author to publish it (or use the name yourself!)

I’m able to publish to existing scoped package, just not a new one, so I know I’m logged in properly. Has anybody else run into this issue?


(Rob Halff) #2

You probably forgot to add ‘–access public’ while pushing your package, next time you publish the package you can omit it.


(Kat Marchán) #3

Is your company scope abadi99 or is that your own username?

Your package’s scope needs to match your company scope name, you need to be logged in, and your user account needs to have permission to publish to that scope.

Check out the docs: https://www.npmjs.com/docs/orgs/getting-started.html


(Abadi Kurniawan) #4

I did use --access public when trying to publish the package.


(Abadi Kurniawan) #5

Originally abadi199 was my own username, and I was logged in with my username, and I got that error. Since then, I converted abadi199 to an organization, and created a new user as the owner of abadi199 org, and tried publishing to that scope again using npm publish --access public, and I still got the same error. I did just recently enable 2fa for both log in, and publishing. Could that be the problem?


(Kat Marchán) #6

That says @abadi99/ng-remotedata, but your username and scope name is @abadi199. Typo?


(Abadi Kurniawan) #7

Hmmm…
My package name is @abadi199/ng-remotedata, so that would make the package’s scope is @abadi199, right? I’m not sure why the error message is saying the scope is @abadi199/ng-remotedata instead of just @abadi199.

Here’s my package.json:

{
  "name": "@abadi99/ng-remotedata",
  "version": "0.0.1",
  "description": "NG Component for rendering RemoteData",
  "author": "Abadi Kurniawan",
  "license": "Apache-2.0",
  "repository": {
    "type": "git",
    "url": "https://github.com/abadi199/remotedata-component.git"
  },
  "homepage": "https://github.com/abadi199/remotedata-component",
  "peerDependencies": {
    "@angular/common": "^6.0.0-rc.0 || ^6.0.0",
    "@angular/core": "^6.0.0-rc.0 || ^6.0.0"
  },
  "main": "bundles/abadi99-ng-remotedata.umd.js",
  "module": "fesm5/abadi99-ng-remotedata.js",
  "es2015": "fesm2015/abadi99-ng-remotedata.js",
  "esm5": "esm5/abadi99-ng-remotedata.js",
  "esm2015": "esm2015/abadi99-ng-remotedata.js",
  "fesm5": "fesm5/abadi99-ng-remotedata.js",
  "fesm2015": "fesm2015/abadi99-ng-remotedata.js",
  "typings": "abadi99-ng-remotedata.d.ts",
  "metadata": "abadi99-ng-remotedata.metadata.json",
  "sideEffects": false,
  "dependencies": {
    "tslib": "^1.9.0"
  }
}

(Abadi Kurniawan) #8

YES! It’s a typo!
I’m missing the 1 in @abadi199`. I can’t believe I missed that multiple times, even after being pointed out :relieved:.

Thank you so much @zkat for helping me :smile:


(system) #9

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.