Home > Web Front-end > Front-end Q&A > What to do if node is not compatible with gulp

What to do if node is not compatible with gulp

藏色散人
Release: 2022-11-08 16:24:57
Original
1787 people have browsed it

Solution to the incompatibility between node and gulp: 1. Create a new "npm-shrinkwrap.json" file in the same directory as the "package.json" file; 2. Execute the "npm install" command; 3. Execute "gulp build" on the command line.

What to do if node is not compatible with gulp

The operating environment of this tutorial: Windows 7 system, node18.4.0 version, Dell G3 computer.

What should I do if node is not compatible with gulp?

REFERENCEERROR: PRIMORDIALS IS NOT DEFINED, that is, the nodejs and gulp versions are incompatible

Solution to REFERENCEERROR: PRIMORDIALS IS NOT DEFINED, that is, the nodejs and gulp versions are incompatible

When building the front-end project, gulp is used, but an error occurs during gulp build, as follows:

What to do if node is not compatible with gulp

Various answers found on the Internet say it is node.js It is not compatible with the gulp version, so I checked my own version, as follows:

What to do if node is not compatible with gulp

According to the solution of upgrading gulp or rolling back the node.js version, I chose the latter , but failed.

According to the solution of another blogger, it was successful. The method is as follows:

Create a new npm-shrinkwrap.json file in the same directory as the package.json file

It needs to contain

{ “dependencies”: { “graceful-fs”: { “version”: “4.2.3” } } }
Copy after login

Execution: npm install

Note that after executing npm install once, this file will have no effect next time.

5. Finally executed on the command line, successful

gulp build

What to do if node is not compatible with gulp

Note: When gulp -v is used, 'gulp' is displayed Not recognized as an internal or external command, operable program or batch file. Then gulp is executed globally,

npm install gulp -g
Copy after login

wants to execute gulp globally. Just configure the environment variables of node to achieve the purpose.

Right-click on the computer =》Properties =》 =》Advanced system settings =》Environment variables

Recommended learning: "nodejs video tutorial"

The above is the detailed content of What to do if node is not compatible with gulp. 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