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.

how-to-npm issues are mostly human error compounded by an annoying bug

See original GitHub issue

Challenge http://www.freecodecamp.com/challenges/waypoint-manage-packages-with-npm.

The dist-tag bug in how-to-npm 2.0.0 is trivial if you know the cause and how to deal with it. The bug is actually triggered entirely by human error: e.g., if you try to add or remove an invalid dist-tag, 403 or 404 errors will begin to accumulate. The tutorial should have delivered a descriptive error message in these cases.

If at any point you see a 403 or 404 error your only recourse is to run how-to-npm again, and in some cases you may need to repeat a prior step.

Here are some common causes for these errors;

  1. Try not to use commands out of sequence. For example, avoid using npm publish on steps that do not ask you to publish. Even if you enter a valid npm command, the tutorial will often break if you do things it isn’t expecting for a given test. If you need to repeat a command, you may be better off returning to the relevant test before picking up at your current step.
  2. npm version should be followed by a version number (e.g., 1.0.2) or by a keyword indicating a semver type (e.g., ‘patch’). See npm help version for examples. (You may also set the version number manually in package.json, but npm version works if you understand the syntax.)
  3. You can not change the dist-tag of the version tagged latest until you’ve assigned latest to a different version.
  4. dist-tags can not be added to a version number beyond the highest existing version. For example, if you’ve set and published version 2.0.0, you can not add a dist-tag to 2.0.1.
  5. Finally, if you set latest to a low number (e.g., 0.0.1) you’re eliminating or vastly reducing the available version numbers to which you can assign dist-tags.

Any of these (and more like them) will cause 403 or 404 errors and will require users to step back, rerun how-to-npm, and be careful not to repeat mistakes.

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Reactions:1
  • Comments:25 (7 by maintainers)

github_iconTop GitHub Comments

47reactions
Philosophistcommented, Apr 11, 2016

The problem with this entire set is that it’s designed to teach by guessing. Please make simple and clear instructions in a tutorial. Don’t TRY to fool students by leaving the solution out of the lesson. I still don’t know how to tell the name of my package or what the function of a package or dependency actually is.

7reactions
kaym0commented, Jul 29, 2016

This is actually ridiculous and I cannot pass it no matter what I have done. I skipped the entire challenge after it would NOT work the 1000 different things I tried, I have spent 3 hours on this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

how-to-npm issues are mostly human error compounded by ...
The dist-tag bug in how-to-npm 2.0.0 is trivial if you know the cause and how to deal with it. The bug is actually...
Read more >
7 Data Breach Case Studies Caused by Human Error | Venafi
Read about these data breach case studies where attackers are accessing encrypted channels in major corporations - all because of human error.
Read more >
Human Error Cited as Top Cause of Data Breaches - SHRM
A new study reveals that companies believe malware and hacking are the top data security concerns, but actually their own employees' actions are...
Read more >
Human Error Often the Culprit in Cloud Data Breaches - WSJ
Gartner Inc. estimates that up to 95% of cloud breaches occur due to human errors such as configuration mistakes, and the research firm...
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