Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes in Gulp notation from version 3 to 4 #19

Open
Michagin opened this issue Mar 4, 2021 · 2 comments
Open

Changes in Gulp notation from version 3 to 4 #19

Michagin opened this issue Mar 4, 2021 · 2 comments

Comments

@Michagin
Copy link

Michagin commented Mar 4, 2021

Gulp is introduced in episode 19. However, gulp recently went from version 3 to 4 and with that, a new notation is used.
function arguments are now supposed to be used with gulp.task( 'default', gulp.series('styles', 'js'), function() { instead of an ordinary array gulp.task( 'default', ['styles', 'js'], function() {.
Converting tasks are easy, however, when I run Gulp Watch, I get this error:

[13:41:35] Starting 'watch'...
[13:41:35] Starting 'default'...
[13:41:35] Starting 'styles'...
[13:41:35] The following tasks did not complete: watch, default, styles
[13:41:35] Did you forget to signal async completion?

I tried setting the required gulp version to 3.9.1 but that gave me 9 high severity vulnerabilities when running npm install.
When fixing them using npm audit fix (and then the recommended npm audit fix --force), npm sets Gulp's decency back to 4.0.2 as of today (Marts. 4th, 2021).

@Michagin Michagin changed the title Changes in gulp notation from Gulp 3 to Gulp 4 Changes in Gulp notation from Gulp 3 to Gulp 4 Mar 4, 2021
@Michagin Michagin changed the title Changes in Gulp notation from Gulp 3 to Gulp 4 Changes in Gulp notation from version 3 to 4. Mar 4, 2021
@Michagin Michagin changed the title Changes in Gulp notation from version 3 to 4. Changes in Gulp notation from version 3 to 4 Mar 4, 2021
@RensDuijsens
Copy link

Same issue here.
I have tied 5 or 6 ways to solve this.
Downgrading, altering the sources.
Running a recovery tool.
Reinstalling the software.
Reinstalling the correct version in a VM-Ware machine.
Etcetera.

I can NOT get it to work.
Help please?

@ori1989
Copy link

ori1989 commented Sep 12, 2021

Fix it in one minute:
Just follow these steps. I'm on Windows 10 and it worked perfectly for me!

In the same directory where you have package.json create a npm-shrinkwrap.json file with the following contents:

{
  "dependencies": {
    "graceful-fs": {
        "version": "4.2.2"
     }
  }
}

Run npm install, and don't worry, it will update npm-shrinkwrap.json with a bunch of content.

Run gulp to start the project.

Taken from:
https://stackoverflow.com/questions/55921442/how-to-fix-referenceerror-primordials-is-not-defined-in-node-js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants