data['dist-tags'][npm.tag] - Cannot read property 'latest' of undefined

1.3k views Asked by At

github: https://github.com/Sly777/React-UI-Debugger

travis CI: https://travis-ci.org/Sly777/React-UI-Debugger

semantic-release: ^6.3.2

basically i'm trying to publish package as first release to public by using semantic-release & travis CI but it doesn't work. I'm getting these errors below.

it's giving error on travis CI

/home/travis/build/Sly777/React-UI-Debugger/node_modules/@semantic-release/last-release-npm/dist/index.js:29
    var version = data['dist-tags'][npm.tag];
                                   ^
TypeError: Cannot read property 'latest' of undefined

after i got this error, i tried to run npm dist-tag ls on local but that time i got error like this

npm ERR! dist-tag ls Couldn't get dist-tag data for react-ui-debugger
npm ERR! Darwin 16.3.0
npm ERR! argv "/Users/xxxx/.nvm/versions/node/v6.9.1/bin/node" "/Users/xxxx/.nvm/versions/node/v6.9.1/bin/npm" "dist-tag" "ls"
npm ERR! node v6.9.1
npm ERR! npm  v3.10.8
npm ERR! code E403

npm ERR! Registry returned 403 for GET on https://registry.npmjs.org/-/package/react-ui-debugger/dist-tags
npm ERR!

package.json

{
  "name": "react-ui-debugger",
  "version": "0.0.0-development"
}

Also i pushed latest tag on github.

What's your opinion? What do you suggest?

2

There are 2 answers

0
the_bluescreen On BEST ANSWER

After tried many times, I found the solution for this (actually, it's not entirely solution). For your first release of your package, you need to release your package without using "semantic-release". With "semantic-release", I don't know why (i didn't get any answer from their team) but it's not working for the first release.

0
Lajos Mészáros On

There might already be a package in the npm registry with the same name. The repo, with which I encountered the same issue, that you reported was already claimed once by someone else and it is currently unpublished.

To check this, simply open this link your browser:

https://registry.npmjs.org/<your package name>

(be sure to type your package name with lowecase letters all the way)

I have also added this info to your github issue page: https://github.com/semantic-release/semantic-release/issues/352

My suggestion is either create a new repo with a different name, or do a manual publish to claim the registry entry as yours.