When something breaks in NPM, the error output usually isn't very clear about the cause. When you provide the full output, I will attempt to determine what is causing your problem, and propose a solution.
This tool is entirely client-side and your input will never be sent to a server, so you don't need to redact information from your log. It's also open-source - you can find the source code for it here.
Enter the full output of your npm install
command, from start to end. Otherwise, I might not be able to find your problem.
Output from npm-debug.log
will not usually work - make sure that you copy the output from your terminal.
binding.gyp
file of the
module.Unfortunately, there's nothing you can do about this, other than filing a bug on the package and waiting for the author to fix it.
One or more build tools or SDKs are missing from your system. Follow the setup instructions for node-gyp
to resolve this.
Something in your environment doesn't work as it should; it's possible that you're missing some build tools, or that they need to be updated or rebuilt.
Try the following steps:
node-gyp
.libtool
is not installed.One of the dependencies you tried to install () requires
libtool
for its compilation process, but it's missing from your system.
To solve this problem, install the libtool
package through your system's package manager, and retry the npm install
.
You will need to have Python installed, to be able to install compiled (C++) modules with NPM. It's possible that you're also missing other build tools.
To solve this problem, follow the setup instructions for node-gyp
.
The node-gyp
utility, which is used for installing compiled (C++) modules with NPM, only supports Python 2. However, you only seem to have Python 3 installed.
To solve this problem, follow the setup instructions for node-gyp
.
If you're certain that you have Python 2 installed, you may need to configure npm
to know where it is. This is also covered in the above instructions. Specifically, you'll want to use the --version
flag.
Newer C++ modules for Node.js require a recent C++ compiler, and not all distributions include a recent enough version of GCC.
The exact instructions will vary by distribution and OS, but these are some that I know of:
If you know of instructions for other distributions, then please send me an e-mail!
The version of the module that you're trying to install, was written for an older Node.js version. There's probably a newer version available, so try updating your project or its dependencies.
If this doesn't work, then file a bug on the module, and ask the author to make it compatible with the newest Node.js version.
The version of the module that you're trying to install, was written for a different Node.js version.
There may be a different version available that's compatible with your Node.js version.
If there isn't, or you can't find it, then file a bug on the module, and ask the author to make it compatible with the newest Node.js version.
A dependency you're trying to install () requires one or more libraries to be installed on your system, but NPM can't find them.
The missing libraries are:
One or more of the libraries that's used by the module exist on your system, but aren't the right version.
Unfortunately I don't really have more information about it - you'll have to read the documentation for the module to determine which version you need to have installed.
Alternatively, you can e-mail me with a gist of your NPM output, and I'll try to find the problem for you.
When installing Node.js from your distribution's package manager, you must also install the development headers. Some possible names of the package for this:
node-dev
node-devel
nodejs-dev
nodejs-devel
Depending on the distribution you're using, it may also have a different name.
Occasionally, NPM installations will bug out, and it seems like that has happened here. Try removing your node_modules
directory, and installing your dependencies again from scratch using npm install
.
Make sure that your package.json
correctly declares all your dependencies, or there might be missing dependencies. This article explains how to install packages in such a way that this is never an issue.
You are most likely running npm install
in something like Docker or VirtualBox, with "shared directories" enabled. This is known to cause issues with symbolic links on some platforms.
A workaround is to install your packages using --no-bin-links
.
Your package.json
indicates a dependency that isn't actually installed into your node_modules
. These are the dependencies you're missing:
You can generally fix this by simply running npm install
, without any additional arguments.
You're missing one or more dependencies that require manual installation - usually, this concerns a library that you've installed a plugin for. The missing dependencies are:
To understand the range notation that is used here (if any), read this article.
Maintaining open-source projects takes a lot of time and effort. If this tool saved you some headaches, consider making a donation :)
If it still doesn't work, please file an issue, containing the full npm install
output.
Please file an issue, containing the full npm install
output. I will try to figure out your error, and add detection for it to this tool as well!