P
P
pavel0101012021-06-23 23:10:54
Node.js
pavel010101, 2021-06-23 23:10:54

How to properly run gulp?

All good evening.
I would be grateful if you tell me how to quickly and easily solve the problem.
I was given a ready-made layout that needs to be changed a little, in this project the assembly is on gulp3.9.1 I have mac os , Node js14.15.1 is installed and I understand that everything above node js => 12 version does not work with gulp3. the problems are all typical, you can look at google
at first through npm the node_modules folder was not loaded at all, I realized that I needed to update node-sass (at first there was an error in the console), then I tried to run gulp and the error
“ReferenceError: primordials is not defined” read on the Internet that you need to add a couple of commands
"scripts" to the json file: {
"preinstall": "npx npm-force-resolutions"
},
"resolutions":
}
I did reinstalled. npm and still the same error when running gulp “ReferenceError: primordials is not defined”
I read several options
1. update the local gulp to version 4 (but then you will need to change the assembly and tasks and there is no experience)
2. Roll back to more earlier versions of node js 10 or 11 (I don’t understand how to do it)
3. or maybe there is an easier way, I’m doing something wrong
, my sequence of actions is like this - add a couple of lines to the json file, run the npm i command (it gives an error that they say old old version of node-sass), I run npm i node-sass - I can add files, but gulp doesn't work (gives the error above)
Thanks in advance, for any help

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Bogachev, 2021-06-24
@pavel010101

2. Roll back to an earlier version of node js 10 or 11 (I don’t understand how to do it)

There are utilities that install many versions of a node and allow you to easily switch between them. I've been liking n for years now (works on both linux and macOS). You can google other options.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question