wfpaisa/plane-theme

Build error

Closed this issue · 4 comments

I've got the following error when trying to build for the very fist time.

MX Linux 21.3
npm 7.5.2
node v12.22.12
$ gulp
fs.js:36
} = primordials;
    ^

ReferenceError: primordials is not defined
    at fs.js:36:5
    at req_ (/home/datalot/git-clones/plane-theme/node_modules/natives/index.js:143:24)
    at Object.req [as require] (/home/datalot/git-clones/plane-theme/node_modules/natives/index.js:55:10)
    at Object.<anonymous> (/home/datalot/git-clones/plane-theme/node_modules/vinyl-fs/node_modules/graceful-fs/fs.js:1:37)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)

Hi, @datalot-369 , please use this node, npm version:

NODE: v8.12.0
NPM: v6.4.1

you can use nvm to change the version: https://github.com/nvm-sh/nvm

I followed those steps but I still get an error when trying to gulp:

  1. Follow these steps to install nvm: https://github.com/nvm-sh/nvm#git-install
  2. Run nvm install 8.12.0
  3. Run nvm use 8.12.0

I have tried npm install gulp-util --save-dev from this issue, but it doesn't work. — Recreating the node_modules won't work either (rm -rf node_modules/ && npm install)

$ gulp
module.js:550
    throw err;
    ^

Error: Cannot find module 'gulp-cli'
    at Function.Module._resolveFilename (module.js:548:15)
    at Function.Module._load (module.js:475:25)
    at Module.require (module.js:597:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/usr/share/nodejs/gulp/bin/gulp.js:3:1)
    at Module._compile (module.js:653:30)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)

These warning are shown after npm -i:

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.13 (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.13: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

added 589 packages from 279 contributors and audited 593 packages in 8.848s
found 36 vulnerabilities (3 low, 9 moderate, 21 high, 3 critical)
  run `npm audit fix` to fix them, or `npm audit` for details

Hi @datalot-369 , the error( Error: Cannot find module 'gulp-cli') could be instal gulp-cli global with:

npm install -g gulp-cli

I tried a lot of things before replying, npm install -g gulp-cli included, but everything failed.

The problem was that after npm install -g gulp-cli you need to restart/reload your session.

Today I ran just the gulp command and it worked flawlessly. I hope this works for someone else.

Closing as solved.