Comments (11)
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/[email protected] 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/[email protected] 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.
from how-to-npm.
@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
from how-to-npm.
Even better, if I then run verify, it is inconsistent with my npm dist-tag ls
:
$ how-to-npm verify
Oops! Your "latest" tag still points at the most recent
release, 1.2.0.
Point that somewhere else, and re-run `how-to-npm verify`
Use `npm help dist-tags` to learn more about how to do it.
#########################################
### YOUR SOLUTION IS NOT CORRECT! ###
#########################################
$ npm dist-tag ls learn-how-to-npm
latest: 1.1.0
Which is super odd, because indeed:
$ cat ~/.config/how-to-npm/registry/learn-how-to-npm/body.json | json dist-tags
{
"latest": "1.2.0"
}
I can't get this to pass through mocked npm usage. I had to manually edit the registry fileβ¦ π’
from how-to-npm.
Same issues here.
from how-to-npm.
This actually does work. See this note on FreeCodeCamp's implementation of how-to-npm for details about the bug and how to avoid it: freeCodeCamp/freeCodeCamp#758
from how-to-npm.
^^ This. Thank you denmch for taking the time to write up that note. It worked for me.
from how-to-npm.
closing in favor of #45
from how-to-npm.
@TheWhippinpost THANK YOU. This is the SOLUTION!
from how-to-npm.
@omijh that was way too perfect thanks
from how-to-npm.
Thank you for your help, @TheWhippinpost. It worked!
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).
To clarify this point though, the publish process for 1.0.2 should happen on Publish again exercise (exercise 10) and not Dist tag removal exercise (exercise 12).
from how-to-npm.
Just try adding new tag with a 1.0.0 if your current version is 1.0.1
npm dist-tag add @yourusername/[email protected]
And how-to-npm verify
should do the thing.
Congratulations! You're a dist-tagging pro!
Run `how-to-npm` to move on to the next exercise.
from how-to-npm.
Related Issues (20)
- Update the label names HOT 1
- Pull request #108 rolls back fix #57 HOT 5
- Incorrectly reports wrong folder on windows due to case sensitivity HOT 1
- Version checking issue with "00 Install npm" exercise HOT 3
- how-to-npm HOT 2
- Very basic NPM newbie question HOT 2
- Cannot publish HOT 2
- npm publish needs a paid account HOT 3
- Renew the problems to support npm@5
- Error, when trying to reset registry HOT 3
- when I type how-to-npm in terminal It gives me the following error HOT 2
- Challenge 00: doesn't tell you how to check version HOT 1
- npm-init fails in Dev Enviroment
- No outdated packages ... HOT 1
- "npm install <package-name>" better than "npm install <module-name>"
- should keep bundleDependencies in package.json? HOT 1
- no such file or directory, chmod '/usr/local/lib/node_modules/how-to-npm/node_modules/mkdirp/bin/cmd.js' HOT 7
- Error: Cannot find module 'workshopper-adventure/adventure' HOT 2
- npm adduser -> Error: code ENYI Web login not supported
- Is this repository still being maintained in 2023? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from how-to-npm.