how-to-npm: issues adding dist-tag & verify skip not working either
See original GitHub issueI am aware that this was an issue in the past and have reviewed those conversations, specifically denmch’s posts on May 30, 2015
I have completed all of jlord’s git-it and some of learn-you-node without any problems
Challenge Name
Manage Packages with npm
https://www.freecodecamp.com/challenges/manage-packages-with-npm (#13)
Issue Description
On step 11 of how-to-npm
Browser Information
- Browser Name: Google Chrome
- Operating System: Windows
- Mobile, Desktop, or Tablet: desktop
Your Code
I’ve tried
aghafour:~/workspace/how-to-npm (master) $ npm dist-tag add fcc-learning@1.0.1 [buggy]
which gives
npm ERR! Linux 4.2.0-c9
npm ERR! argv "/home/ubuntu/.nvm/versions/node/v4.4.5/bin/node" "/home/ubuntu/.nvm/versions/node/v4.4.5/bin/npm" "dist-tag" "add" "fcc-learning@1.0.1" "[buggy]"
npm ERR! node v4.4.5
npm ERR! npm v3.10.3
npm ERR! code E404
npm ERR! 404 missing : -/package/fcc-learning/dist-tags
npm ERR! Please include the following file with any support request:
npm ERR! /home/ubuntu/workspace/how-to-npm/npm-debug.log
I’ve also tried variations of the initial command, the corresponding dist-tag ls command (which returns same errors), going back and redoing the publish and republish levels, making sure that the version I’m trying to do isn’t the latest, and adding a “dist-tags” property of “buggy” to my package.json object (total hail mary based off the ERR! 404 missing:
from above)
how-to-npm verify skip
isn’t working either. Can anyone help me?
Issue Analytics
- State:
- Created 7 years ago
- Comments:7 (4 by maintainers)
Top GitHub Comments
I went back to look through this as I originally stopped at the dist-tag step. Turns out, it does work but is very picky. See the post here from wayback regarding this issue: https://github.com/FreeCodeCamp/FreeCodeCamp/issues/758
I recommend going back to the “Start A Project” step, and redoing npm init as my package did not have my username in the name: area of the package.json. When I was getting the error you got, the name was “fccproject”, but when I re-did npm init, it changed it to
@dhcodes/fccproject
. I was then able to re-run the publish step. For the version step, as noted in #758, be sure to add a new version number (ex.npm version 1.0.x
where x is incremented +1) even though the directions aren’t clear on this. Then verify and do publish again. And verify that.Finally, when dealing with the dist-tag, know that the syntax should be:
npm dist-tag add @yourusername/yourpkgname@1.0.x test
where you change it to match your username and your pkg name and change x to be your version number from publish, NOT publish again–since you can’t add a dist-tag to the latest release. To confirm the details of your pkg, you can runnpm ls
to see your username and package name.Lastly,
npm dist-tag ls
can help with the task to remove dist-tags. Best of luck!I also had the same issue. tbh, I didn’t try dhcodes’ solution partially because I feel like this should either be fixed or not included in the lesson with such a difficult to use tutorial. I’m moving along and will hopefully just figure this out over time.