gulp deploy command not working throwing reference error - npm

I have node version of 16.15.0 with npm version of 8.10.0 and gulp cli version 3.9.1
but when I run the command gulp dev-deploy --cmd-version 3664 --development true
I get
fs.js:47
} = primordials;
^
ReferenceError: primordials is not defined
at fs.js:47:5
at req_ (C:\workspace\UI\symnxt\component\node_modules\natives\index.js:143:24)
at Object.req [as require] (C:\workspace\UI\symnxt\component\node_modules\natives\index.js:55:10)
at Object. (C:\workspace\UI\symnxt\component\node_modules\gulp\node_modules\graceful-fs\fs.js:1:37)
at Module._compile (node:internal/modules/cjs/loader:1105:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
Can anyone help me on it,is it version issue,I tried updating gulp to v4 but still didnt worked

Related

Electron build failed

Electron build failed.
Error: Cannot find module 'fs/promises' Require stack:
/Users/abhimatta/Documents/abhishek/accura-electron-dev/node_modules/builder-util/out/fs.js
/Users/abhimatta/Documents/abhishek/accura-electron-dev/node_modules/builder-util/out/util.js
/Users/abhimatta/Documents/abhishek/accura-electron-dev/node_modules/electron-builder/out/cli/cli.js
/Users/abhimatta/Documents/abhishek/accura-electron-dev/node_modules/electron-builder/cli.js
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:797:15)
at Function.Module._load (internal/modules/cjs/loader.js:690:27)
at Module.require (internal/modules/cjs/loader.js:852:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object. (/Users/abhimatta/Documents/abhishek/accura-electron-dev/node_modules/builder-util/src/fs.ts:4:1)
at Module._compile (internal/modules/cjs/loader.js:959:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
at Module.load (internal/modules/cjs/loader.js:815:32)
at Function.Module._load (internal/modules/cjs/loader.js:727:14)
at Module.require (internal/modules/cjs/loader.js:852:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object. (/Users/abhimatta/Documents/abhishek/accura-electron-dev/node_modules/builder-util/src/util.ts:24:1)
at Module._compile (internal/modules/cjs/loader.js:959:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)
at Module.load (internal/modules/cjs/loader.js:815:32)
at Function.Module._load (internal/modules/cjs/loader.js:727:14)
Package.json configurations
"electron": "^10.4.0",
"electron-builder": "^22.10.4",
I am trying to learn Electron. Level - zero.
I would check your node and electron versions match.
Info: https://www.electronjs.org/docs/latest/tutorial/electron-timelines
My version -- node 12.22.7 -- electron 11.5.0
I eliminated this error while learning Electron in this way:
if error: "cannot find module'fs/promises'
then
npm uninstall electron-builder
and
npm i electron-builder#22.10.5
The developers claim that this bug is indeed present in node 12
and is fixed in node 14+.

webpack-cli can't find webpack module

i have installed webpack globally and when i run webpack it says
One CLI for webpack must be installed. These are recommended choices, delivered as separate packages:
- webpack-cli (https://github.com/webpack/webpack-cli)
The original webpack full-featured CLI.
We will use "npm" to install the CLI via "npm install -D".
Do you want to install 'webpack-cli' (yes/no):
and I say yes, the webpack-cli seems to be installed correctly but i got an error message that says
{ Error: Cannot find module 'webpack'
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:582:15)
at Function.Module._load (internal/modules/cjs/loader.js:508:25)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (C:\Users\TOSHIBA\node_modules\v8-compile-cache\v8-compile-cache.js:159:20)
at Object.<anonymous> (C:\Users\TOSHIBA\node_modules\webpack-cli\bin\convert-argv.js:7:24)
at Module._compile (C:\Users\TOSHIBA\node_modules\v8-compile-cache\v8-compile-cache.js:178:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
at Module.load (internal/modules/cjs/loader.js:600:32)
at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
at Function.Module._load (internal/modules/cjs/loader.js:531:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at yargs.parse (C:\Users\TOSHIBA\node_modules\webpack-cli\bin\cli.js:228:14)
at Object.parse (C:\Users\TOSHIBA\node_modules\yargs\yargs.js:567:18)
at C:\Users\TOSHIBA\node_modules\webpack-cli\bin\cli.js:206:8
at Object.<anonymous> (C:\Users\TOSHIBA\node_modules\webpack-cli\bin\cli.js:505:3)
at Module._compile (internal/modules/cjs/loader.js:701:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
at Module.load (internal/modules/cjs/loader.js:600:32)
at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
at Function.Module._load (internal/modules/cjs/loader.js:531:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at runCommand.then (C:\Users\TOSHIBA\AppData\Roaming\npm\node_modules\webpack\bin\webpack.js:143:5)
at process._tickCallback (internal/process/next_tick.js:68:7) code: 'MODULE_NOT_FOUND' }
what is possibility goes wrong?
Try to npm link webpack-cli to Link Globally installed package of your project

Why can I not start the Vue UI after installing the Vue CLI?

Using the following:
node 8.11.2
npm 6.3.0
I then try to install the Vue CLI (#vue/cli#3.0.0):
npm i -g #vue/cli
but when I run the following command:
vue ui
I get the following error:
Error: Cannot find module 'core-js/modules/es7.object.entries'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (C:\Apps\caches\npm\node_modules\#vue\cli\node_modules\apollo-upload-server\lib\mi
ddleware.js:14:1)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
It turned out I had to install the core-js package explicitly.
npm i -g core-js
Not sure why this wasn't installed as a dependency though.
The issue has been reported HERE and has been fixed in v3.0.1.

johnny-five library is not getting detected by npm

I tried installing Johnny-five library as specified in the website. After installation while running the code i am getting error as below, please help.
While installing Johnny-five package I got a message such as package-lock.json need to be committed, is it creating any issues?
D:\Js-Arduino>node servo.js
module.js:549
throw err;
^
Error: Cannot find module 'johnny-five'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (D:\Js-Arduino\servo.js:1:74)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
This issue has been resolved.
Moved nodemodules global path to Env variables and Npm started detecting it

npm commands are throwing error

I have installed nodejs and also have "package.json" in my application.
But every npm command is throwing following error in console:
module.js:540
throw err;
^
Error: Cannot find module 'internal/util/types'
at Function.Module._resolveFilename (module.js:538:15)
at Function.Module._load (module.js:468:25)
at Module.require (module.js:587:17)
at require (internal/module.js:11:18)
at evalmachine.<anonymous>:31:26
at Object.<anonymous> (C:\Users\SattikaA\AppData\Roaming\npm\node_modules\npm\node_modules\npm-registry-client\node_modules\graceful-fs\fs.js:11:1)
at Module._compile (module.js:643:30)
at Object.Module._extensions..js (module.js:654:10)
at Module.load (module.js:556:32)
at tryModuleLoad (module.js:499:12)
I've tried to remove and reinstall latest nodejs version; still problem remains the same.
not load from node_module folder, it need begin with './', '../' or '/'。more detail on https://nodejs.org/api/modules.html#modules_core_modules