Home > Web Front-end > Front-end Q&A > How to solve node gyp error reporting problem

How to solve node gyp error reporting problem

藏色散人
Release: 2021-12-13 11:27:15
Original
9907 people have browsed it

Node gyp error solution: 1. Open cmd administrator mode; 2. Execute "npm install --global --production windows-build-tools"; 3. Install node-gyp; 4. Configuration Just rely on it.

How to solve node gyp error reporting problem

The operating environment of this article: Windows 7 system, nodejs version 10.16.2, Dell G3 computer.

How to solve node gyp error reporting problem?

Solution to node-gyp error problem:

1. npm install windows-build-tools

Open cmd administrator mode and execute the following command:

npm install --global --production windows-build-tools

Wait for the execution to complete and restart CMD

2. Install node-gyp under windows

node-gyp is the compilation tool used when compiling c extensions for node.

Installation method:

npm install -g node-gyp

3. Configuration dependencies

## npm config set python python2.7

## npm config set msvs_version 2015If nothing else happens, we can use node-gyp to build.

If there is a problem, you can refer to the github homepage of node-gyp.

4. If Python3 is already installed on your computer and there is a conflict between the two versions, you need to change the file name:

%USERPROFILE%\.windows-build-tools\python27

Change to Python2.exe and PythonW2.exe

Recommended learning: "

node.js video tutorial

"

The above is the detailed content of How to solve node gyp error reporting problem. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template