

The install can take upwards of 30 minutes depending on your connection, so don’t despair if it seems like the install is hanging for a while. The bad news is that there are a lot of things included in it.ĭepending on the version you download, it can hover between three and eight gigabytes (all to get some dependencies installed!). The good news is that installing this package should take care of all of the wiring up of these components. NPM has a package called windows-build-tools that should automatically install everything you need to get node-gyp working, including the Microsoft build tools, compilers, Python, and everything else required to build native Node modules on Windows. Try downloading the windows-build-tools package.Īccording to the node-gyp documentation, this step should be the end-all-be-all solution to fixing node-gyp problems. Make sure that you’re always working in an elevated terminal (with administrator privileges) and that you restart your console whenever a download is complete. As we begin our journey into getting node-gyp up and running, here’s an important note for all of the steps that follow. If you run this and still get the error, I have bad news: You’re in for a bit of a ride.

Try running npm install –no-optional to install only the required dependencies.

If you’re lucky, the dependency that requires node-gyp will be optional, and you can skip the entire process required to get it working.

Try running npm install with the -no-optional flag. This guide is meant to help solve the issues that can arise when installing a package that requires node-gyp. The Windows environment makes getting node-gyp to work a less-than-stellar developer experience, full of multiple pitfalls and many ways for things to go wrong. Unfortunately, this is not the case with Windows, as is evidenced by this thread from 2015. On most systems, this isn’t an issue, and installing node-gyp with the rest of your packages works as expected. It has widespread use and is included as a dependency in many NPM packages. Node-gyp is a tool that enables the compilation of native add-on modules for Node in multiple platforms.
