Unhandled 'error' event when run npm install - npm

When I run mvnw -Pdev,webpack command, I got this error. I will appreciate if anyone could help me.
--- frontend-maven-plugin:1.6:npm (npm install) # demoapp ---
Running 'npm install' in C:\Users\pc\demoapp
> demoapp#0.0.0 postinstall C:\Users\pc\demoapp
> webdriver-manager update --gecko false
[09:55:46] I/config_source - curl -oC:\Users\pc\demoapp\node_modules\protractor\node_modules\webdriver-manager\selenium\standalone-response.xml https://selenium-release.storage.googleapis.com/
[09:55:46] I/config_source - curl -oC:\Users\pc\demoapp\node_modules\protractor\node_modules\webdriver-manager\selenium\chrome-response.xml https://chromedriver.storage.googleapis.com/
events.js:183
throw er; // Unhandled 'error' event
^
Error: read ECONNRESET
at TLSWrap.onread (net.js:622:25)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! demoapp#0.0.0 postinstall: `webdriver-manager update --gecko false`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the demoapp#0.0.0 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\pc\AppData\Roaming\npm-cache\_logs\2018-10-16T06_55_48_437Z-debug.log

I ran into the same symptoms because of an inconsistent node_modules/ state.
Deleting node_modules/ and running npm install --verbose solved my issue. Even despite the --verbose flags, the installation process may not show progress for four and more minutes. Checking for a changing directory size of node_modules/ regularly calmed me down and let me know the installation kept going on.

When using Windows 10 Powershell, the solution to this for me was to run Powershell as Administrator.
Prior to that, I tried deleting nodes_modules/ as described in https://stackoverflow.com/a/53558340/1207532 but that didn't make any difference for me.

Related

error when i try to install vue.js in my computer (windows 10)

Below the error message:
1 package is looking for funding
npm ERR! code ENOLOCK
npm ERR! audit This command requires an existing lockfile.
npm ERR! audit Try creating one first with: npm i --package-lock-only
npm ERR! audit Original error: loadVirtual requires existing shrinkwrap file
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\vinic\AppData\Local\npm-cache_logs\2022-11-11T20_01_58_589Z-debug-0.log
Does anyone know what can it be?
I tried to run the command prompt and powershell on windows in addition to finishing in Vs Code and I was not successful

Whenever I run npm install in my terminal, I get "cb() never called"

npm ERR! cb() never called!
npm ERR! This is an error with npm itself. Please report this error at:
npm ERR! <https://npm.community>
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\JOVANNE DELA ROSA\AppData\Roaming\npm-cache\_logs\2021-07-16T20_58_48_839Z-debug.log
When we install a node packages from package.json file and package-lock.json file is corrupted due to some reasons like node.js version is updated to the latest, we will see an error like this in our terminal.
To fix this error, first delete the package-lock.json file and run the following command.
npm cache clean --force
Now, try to install your packages using the npm install command.

Nuxt.js: fsevents is not a constructor

I'm using MacOS Mojave 10.14.5. When I run 'npm run dev' command where the nuxt starter package is located, I have 'fsevents' error, and the server doesn't work.
I already reinstall node and npm several times, but it doesn't work.
Here's an error:
/Users/kimgyun/Desktop/nuxt_test_folder/nuxt_test_b/node_modules/watchpack/node_modules/chokidar/lib/fsevents-handler.js:28
return (new fsevents(path)).on('fsevent', callback).start();
^
TypeError: fsevents is not a constructor
at createFSEventsInstance (/Users/kimgyun/Desktop/nuxt_test_folder/nuxt_test_b/node_modules/watchpack/node_modules/chokidar/lib/fsevents-handler.js:28:11)
at setFSEventsListener (/Users/kimgyun/Desktop/nuxt_test_folder/nuxt_test_b/node_modules/watchpack/node_modules/chokidar/lib/fsevents-handler.js:82:16)
at FSWatcher.FsEventsHandler._watchWithFsEvents (/Users/kimgyun/Desktop/nuxt_test_folder/nuxt_test_b/node_modules/watchpack/node_modules/chokidar/lib/fsevents-handler.js:252:16)
at FSWatcher.<anonymous> (/Users/kimgyun/Desktop/nuxt_test_folder/nuxt_test_b/node_modules/watchpack/node_modules/chokidar/lib/fsevents-handler.js:386:25)
at LOOP (fs.js:1570:14)
at process._tickCallback (internal/process/next_tick.js:61:11)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! nuxt_test_b#1.0.0 dev: `nuxt`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the nuxt_test_b#1.0.0 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! /Users/kimgyun/.npm/_logs/2019-06-06T02_11_18_374Z-debug.log
How can I run this nuxt.js server without this error?
It's a problem with fs events, and a rather annoying one at that. Specifically this happens when you're using Node 12.
You'll need to install fsevents#1.2.9 explicitly:
npm i fsevents#1.2.9 -D
or
yarn add fsevents#1.2.9 -D
This should work for you at this point.

The NativeScript Plugin Seed Demo Does Not Run

We are trying to use our native codes in Nativescript therefore we tried to test nativeScript plugin seed. We follow the steps to in README however demo does not run and stops.
We tried all available version we could reach and applied the flow we see in guidance videos.
Last section of terminal messages:
Webpack compilation complete. Watching for file changes. Webpack build
done! Copying template files... Unable to apply changes on device:
F2CB7B69-FE7F-4EE7-9150-133E604FBF18. Error is: zlib: unexpected end
of file. npm ERR! code ELIFECYCLE npm ERR! errno 134 npm ERR!
nativescript-tstpin#1.0.0 demo.ios: npm run tsc && cd ../demo && tns
run ios --syncAllFiles --emulator npm ERR! Exit status 134 npm ERR!
npm ERR! Failed at the nativescript-tstpin#1.0.0 demo.ios 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/hasanguner/.npm/_logs/2019-05-22T08_53_09_212Z-debug.log
Hasans-MacBook-Pro:src hasanguner$
After the messages in the terminal it stops. It would be great if anyone could help how to step over this starting point.
Solved. I tried the following: On Mac:
sudo npm cache clean --force
Then worked fine.
If anyone tells me the reason it would be perfect.

Failed at the electron#1.8.2 postinstall script

I was trying to install electron into my project, but it is giving an error. I also tried to do this with unsafe-perm, but still giving the same error.
npm install electron --save-dev --save-exact
> electron#1.8.2 postinstall E:\PrgLang\Electron\crypto-app\node_modules\electron
> node install.js
Downloading electron-v1.8.2-win32-x64.zip
[============================================>] 100.0% of 55.21 MB (1.51 MB/s)
E:\PrgLang\Electron\crypto-app\node_modules\electron\install.js:47
throw err
^
Error: Could not parse checksum file at line 1:
at new ChecksumParseError (E:\PrgLang\Electron\crypto-app\node_modules\sumchecker\build.js:71:127)
at E:\PrgLang\Electron\crypto-app\node_modules\sumchecker\build.js:130:20
at Array.forEach (<anonymous>)
at E:\PrgLang\Electron\crypto-app\node_modules\sumchecker\build.js:125:38
at new Promise (<anonymous>)
at ChecksumValidator.parseChecksumFile (E:\PrgLang\Electron\crypto-app\node_modules\sumchecker\build.js:121:14)
at <anonymous>
npm WARN crypto-app#1.0.0 No description
npm WARN crypto-app#1.0.0 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! electron#1.8.2 postinstall: `node install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the electron#1.8.2 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\Harshit\AppData\Roaming\npm-cache\_logs\2018-02-11T03_33_52_399Z-debug.log
Can you please try(after removing node_modules)
sudo npm install electron --save-dev --save-exact --unsafe-perm=true --allow-root
I was running into the same error and this is what worked for me.
According to this GitHub issue it could potentially be solved with one of the following actions:
remove the node_modules folder and run npm install again
rename the SHASUM file in your user home directory's .electron folder
The postinstall script of Electron is downloading a binary from a non-npm domain (possibly github.com), for which the proxy may not be configured.