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

Gulp version outdated #38

Open
weleoka opened this issue Feb 3, 2021 · 1 comment
Open

Gulp version outdated #38

weleoka opened this issue Feb 3, 2021 · 1 comment

Comments

@weleoka
Copy link

weleoka commented Feb 3, 2021

Not sure how bumping to Gulp 4 will affect the project. Currently it does not build on a base Node install.

$ ./node_modules/.bin/gulp -v     
CLI version 3.9.1
Local version 3.9.1

$ node -v
v15.7.0

$ ./node_modules/.bin/gulp dist
fs.js:51
} = primordials;
    ^
ReferenceError: primordials is not defined
    at fs.js:51:5
    at req_ (/home/node/node_modules/natives/index.js:143:24)
    at Object.req [as require] (/home/node/node_modules/natives/index.js:55:10)
    at Object.<anonymous> (/home/node/node_modules/vinyl-fs/node_modules/graceful-fs/fs.js:1:37)
    at Module._compile (node:internal/modules/cjs/loader:1108:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
    at Module.load (node:internal/modules/cjs/loader:973:32)
    at Function.Module._load (node:internal/modules/cjs/loader:813:14)
    at Module.require (node:internal/modules/cjs/loader:997:19)
    at require (node:internal/modules/cjs/helpers:92:18)

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

Checking the versions:

$ npm outdated
Package     Current  Wanted  Latest  Location                 Depended by
gulp          3.9.1   3.9.1   4.0.2  node_modules/gulp        status-title-bar
gulp-clean    0.2.4   0.2.4   0.4.0  node_modules/gulp-clean  status-title-bar
gulp-util    2.2.20  2.2.20   3.0.8  node_modules/gulp-util   status-title-bar
gulp-zip      0.3.4   0.3.4   5.0.2  node_modules/gulp-zip    status-title-bar

Updating the devDependencies:

$ npm install gulp@latest gulp-clean@latest gulp-util@latest gulp-zip@latest
npm WARN deprecated [email protected]: gulp-util is deprecated - replace it, following the guidelines at https://medium.com/gulpjs/gulp-util-ca3b1f9f9ac5

Resulting package.json:

{
  "name": "status-title-bar",
  "description": "Gnome-Shell extension that shows the focused window titlebar in the status panel.",
  "version": "1.0.5",
  "devDependencies": {
    "gulp": "^4.0.2",
    "gulp-clean": "^0.4.0",
    "gulp-util": "^3.0.8",
    "gulp-zip": "^5.0.2"
  }
}

Of course now we're on Gulp 4, so the tasks in the gulpfile have to be updated to new syntax. Anyone got any thoughts on doing this work. Shall I go ahead and see about putting a PR together?

@emerinohdz
Copy link
Owner

Hi @weleoka , a possible workaround for now could be to install the latest compatible node version using nvm:

nvm install 11.15.0
nvm use 11.15.0
npm clean install
./node_modules/.bin/gulp dist

Feel free to come up with a PR to migrate to gulp v4!

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

2 participants