This section is dedicated for the common errors that can occur while using npm.
There are cases where you honestly followed this tutorial or the npm documentation and still had errors either due to the version of node you installed or the version of npm that you are working with. It could even be that you mistakenly broke npm. This series will help you resolve these issues.
Try the latest version on node
In the case where you are experiencing issues while using a version of node that is unsupported or unstable (usually odd numbered versions of npm e.g 0.7.x, 0.9.x, 0.11.x) it is very possible that your issue can be fixed by using the LTS (long term support) version of node.
To see the version of node that you are working with, you can run:
Updating node on Linux
Most Linux distributions (Debian/Ubuntu and RedHat/CentOS), the latest node version that is provided by the distribution may lag behind the stable version. An instruction of getting the latest version can be found here https://github.com/nodesource/distributions.
Updating node on Windows
You can install the latest msi from https://nodejs.org/en/download
Updating node on OSX
You can install the latest package from https://nodejs.org/en/download
Or by running
brew install node
in the case where you are using homebrew
A very easy way to stay up-to-date
There are many versions of Node.js, and it is in very active development. As a good practice to manage the various npm versions, it is recommended that you use a version manager for your Node.js installation. There are lots of great options available for you, namely:
- Weekly Trends
- Python Interview Questions and Answers: Comprehensive Guide
- Scala Exercises, Practice, Solution
- Kotlin Exercises practice with solution
- MongoDB Exercises, Practice, Solution
- SQL Exercises, Practice, Solution - JOINS
- Java Basic Programming Exercises
- SQL Subqueries
- Adventureworks Database Exercises
- C# Sharp Basic Exercises
- SQL COUNT() with distinct
- Java Collection Exercises
- SQL COUNT() function
- SQL Inner Join