Error while installing an ejs Template engine, - node.js

I am getting this error while installing ejs as node is not recognized,but in system variable it is present.what to do..
$ npm install ejs
node --harmony ./postinstall.js
'node' is not recognized as an internal or external command,
operable program or batch file.
npm WARN contact_list#1.0.0 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ejs#3.1.3 postinstall: node --harmony ./postinstall.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ejs#3.1.3 postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR!
C:\Users\SM185585\AppData\Roaming\npm-cache_logs\2020-05-28T13_08_27_678Z-debug.log

Related

not able to start frontend app of jhipster project

I created a jhipster project. But I am not able to run the application using mvnw command. after starting the app using mvnw the browser displays the error message that says the front end app is not running, try starting it separately. there's no error in the log.
However, when I tried starting the front end application alone with the "npm start" command I got the following error,
> light-sail#0.0.1-SNAPSHOT webpack C:\personal\code\POC\LightSail
> node --max_old_space_size=4096 node_modules/webpack/bin/webpack.js "serve" "--config" "webpack/webpack.dev.js" "--inline" "--env" "stats=minimal"
[webpack-cli] Unable to load '#webpack-cli/serve' command
[webpack-cli] TypeError: options.forEach is not a function
at WebpackCLI.makeCommand (C:\personal\code\POC\LightSail\node_modules\webpack-cli\lib\webpack-cli.js:173:21)
at ServeCommand.apply (C:\personal\code\POC\LightSail\node_modules\#webpack-cli\serve\lib\index.js:41:19)
at loadCommandByName (C:\personal\code\POC\LightSail\node_modules\webpack-cli\lib\webpack-cli.js:907:35)
at async Command.<anonymous> (C:\personal\code\POC\LightSail\node_modules\webpack-cli\lib\webpack-cli.js:1462:17)
at async Promise.all (index 0)
at async WebpackCLI.run (C:\personal\code\POC\LightSail\node_modules\webpack-cli\lib\webpack-cli.js:1500:9)
at async runCLI (C:\personal\code\POC\LightSail\node_modules\webpack-cli\lib\bootstrap.js:11:9)
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! light-sail#0.0.1-SNAPSHOT webpack: `node --max_old_space_size=4096 node_modules/webpack/bin/webpack.js "serve" "--config" "webpack/webpack.dev.js" "--inline" "--env" "stats=minimal"`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the light-sail#0.0.1-SNAPSHOT webpack script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\admin\AppData\Roaming\npm-cache\_logs\2021-11-14T10_08_32_848Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! light-sail#0.0.1-SNAPSHOT webpack-dev-server: `npm run webpack -- serve "--config" "webpack/webpack.dev.js" "--inline" "--env" "stats=minimal"`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the light-sail#0.0.1-SNAPSHOT webpack-dev-server script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\admin\AppData\Roaming\npm-cache\_logs\2021-11-14T10_08_32_877Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! light-sail#0.0.1-SNAPSHOT webapp:dev: `npm run webpack-dev-server -- --config webpack/webpack.dev.js --inline --env stats=minimal`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the light-sail#0.0.1-SNAPSHOT webapp:dev script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\admin\AppData\Roaming\npm-cache\_logs\2021-11-14T10_08_32_918Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 2
npm ERR! light-sail#0.0.1-SNAPSHOT start: `npm run webapp:dev`
npm ERR! Exit status 2
npm ERR!
npm ERR! Failed at the light-sail#0.0.1-SNAPSHOT start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\admin\AppData\Roaming\npm-cache\_logs\2021-11-14T10_08_32_967Z-debug.log
the package.json has the following version,
"webpack-cli": "4.7.2",
UPDATE
installed node version is v14.17.5
can anyone help?
the jhipster version I was using was 7.1.0. After upgrading it to 7.3.1 everything works fine.

npm doesn't start propperly, Cannot find module 'worker_threads

I've got following version in node: v10.24.0 and following version in npm: 6.14.11.
Now when I want to start my Angular frontend with the command ng serve there will be thrown following error code:
ng serve
An unhandled exception occurred: Cannot find module 'worker_threads'
See "/tmp/ng-10r9yq/angular-errors.log" for further details.
npm ERR! code ELIFECYCLE
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! frontend#0.0.0 start: ng serve
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the frontend#0.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely
additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/.npm/_logs/2021-08-10T09_38_36_059Z-debug.log
You can try updating your Node Version to 14.0.0 or higher and it should work as desired

what I can when there is error while running electron app

I made my first electron app through electronjs documentation.
I ran the application using npm start command,
but that showing me this error
$ npm start
my-electron-app#1.0.0 start C:\Users\aksha\OneDrive\Desktop\ElcDocStarter\my-electron-app
electron .
'electron' is not recognized as an internal or external command,
operable program or batch file.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! my-electron-app#1.0.0 start: `electron .`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the my-electron-app#1.0.0 start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\aksha\AppData\Roaming\npm-cache\_logs\2021-02-17T08_15_08_284Z-debug.log
Install electron as global NPM module:
npm i -g electron

npm install error after uninstalling Hyperledger-composer - Blockchain

Hello I'm currently learning hyperledger composer but I reinstalled it and i'm installing it again. Now when I npm install, I get the error below. If anyone can help me out that would be great.
➜ Dabbous-Innopay npm install
> fabric-dev-servers#0.0.14 prepare /Users/alydabbous/code/Dabbous-Innopay
> npm run build-archives
> fabric-dev-servers#0.0.14 build-archives /Users/alydabbous/code/Dabbous-Innopay
> gulp --gulpfile .travis/gulp.js
[16:45:08] No gulpfile found
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! fabric-dev-servers#0.0.14 build-archives: `gulp --gulpfile .travis/gulp.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the fabric-dev-servers#0.0.14 build-archives script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/alydabbous/.npm/_logs/2018-11-05T15_45_08_550Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! fabric-dev-servers#0.0.14 prepare: `npm run build-archives`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the fabric-dev-servers#0.0.14 prepare script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/alydabbous/.npm/_logs/2018-11-05T15_45_08_587Z-debug.log
Make sure You are Using Node 8.9 or bellow:
node -v
if output is more than 8.9 then uninstall node and re-install it with 8.9 version or use nvm(Node Version Manager). Google it you can find above process easily.

ERR! while running node.js app

Whenever I try to run node.js application, I get error messages though application runs successfully. Just curious what does these errors really mean.
Here is the output from the console while running a simple node.js application:
npm ERR! node v6.11.2
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! app-service-hello-world#0.0.1 start: `node index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the app-service-hello-world#0.0.1 start script 'node index.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the app-service-hello-world package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node index.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs app-service-hello-world
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls app-service-hello-world
npm ERR! There is likely additional logging output above.

Resources