

Once installed, run the following command to check whether Python is correctly installed or not. The newest version of Python at the time of this writing is 3.10.0. Go to the Python website, download the latest version and install it. The solution is straightforward – install Python. It's because Python is not installed on your machine.

NOTE: The default version of node-gyp is 8.2.0, which comes with node.js (LTS) 14.13.0, as the screenshot says. You might see the error message like below while running the command, npm install. The node-gyp package has a direct dependency on Python, and you have to install it beforehand. It doesn't matter whether you are developing Python apps or not. Depending on your case, you might use the node-gyp package, which you are likely to meet the errors below. I know the steps identified above are exactly the same but similar.


The node-gyp package is a part of npm, which is automatically installed while installing node.js. Throughout this post, I'm going to discuss how to fix the node-gyp error on Windows 11. But what if you want to keep your dev environment on Windows 11? One of the most infamous errors you might be able to see is related to the node-gyp package. If you use Windows Subsystem for Linux (WSL), you can make use of the Linux environment for it. In the Windows dev environment, the same exercise applies. It's a common practice using node.js for front-end app development.
