question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

dist-tag removal challenge 403's when resetting latest, then gets inconsistent

See original GitHub issue

I tried this a few times, always results with the same scenario when I’m on the “dist-tag removal” challenge:

$ npm dist-tag add learn-how-to-npm@1.1.0 latest
npm ERR! Darwin 14.1.0
npm ERR! argv "node" "/Users/tdd/.nvm/v0.10.36/bin/npm" "dist-tag" "add" "learn-how-to-npm@1.1.0" "latest"
npm ERR! node v0.10.36
npm ERR! npm  v2.7.6
npm ERR! code E403

npm ERR! Registry returned 403 for PUT on http://localhost:15443/-/package/learn-how-to-npm/dist-tags/latest
npm ERR! 
npm ERR! If you need help, you may report this error at:
npm ERR!     <https://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/tdd/perso/node/learn-how-to-npm/npm-debug.log

$ npm dist-tag ls learn-how-to-npm 
latest: 1.1.0

I’ve got two versions in the registry: 1.1.0 and 1.2.0. This is regardless of another tag existing or not on these versions.

Issue Analytics

  • State:open
  • Created 8 years ago
  • Comments:11 (2 by maintainers)

github_iconTop GitHub Comments

9reactions
TheWhippinpostcommented, Jul 13, 2016

As this thread directly addresses the dist-tag removal (rm) aspect of the challenge, I’ll post my workaround here (before I forget).

The problem I had was re-assigning the “latest” tag to another version before being allowed to remove another tag from the actual latest version.

Adding a tag If you’ve had problems adding a tag, see dhcodes’ solution here. (You should only have to do it once.) Then come back. I know it’s all over the show, but this should still save you a few hours searching, trust.).

We’ll assume you have version 1.0.1 published by this stage.

OK now create another version (1.0.2). Type: how-to-npm and run through the version and publish challenges again, respectively. (Hint, I replaced “1.0.1” with “1.0.2” in package.json directly and saved).

Verify

Because 1.0.2 is now the latest version, it will already be tagged “latest”, so add another tag to it (name it “dev” or “test”, whatever) by completing the Dist Tag challenge.

Type: how-to-npm Select: Dist Tag Type: npm dist-tag add @username/packagename@1.0.2 dev

Re-assign “latest” tag to another version Now point the “latest” tag to version: 1.0.1

Type: how-to-npm Select: Dist Tag (yet again) Type: npm dist-tag add @username/packagename@1.0.1 latest

Verify.

If that goes well you’ll have both versions tagged, so go to the Dist Removal challenge (how-to-npm).

Type: npm dist-tag rm @username/packagename test

Verify and (hopefully) you’re good to go.

Convoluted, I know. IMO I think this challenge should be removed until fixed. Anyway, I am tired so I hope this is in the right order.

1reaction
omijhcommented, Sep 30, 2017

@TheWhippinpost Thank you although what i did was just

npm dist-tag rm beta npm dist-tag add @1.0.0 latest

and it solved my problem all i had to do was change the latest version to my previous original version

Read more comments on GitHub >

github_iconTop Results From Across the Web

npm-dist-tag
npm-dist-tag. Modify package distribution tags. Select CLI Version: Version 9.2.0 (Latest Release).
Read more >
Time Tracking Report - Sonatype JIRA
Bug, NEXUS-34847, New, Major, 'Docker - Delete unused manifests and images' fails ... Checksum attributes listed inconsistently and in a different order.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found