node.js error trying to install express - node.js

Im trying to install express through npm:
npm install express -g
but it doesnt want to work:(
System is Windows XP
npm-debug.log says :
3672 error Error: read ECONNRESET
3672 error at errnoException (net.js:878:11)
3672 error at TCP.onread (net.js:539:19)
3673 error If you need help, you may report this log at:
3673 error <http://github.com/isaacs/npm/issues>
3673 error or email it to:
3673 error <npm-#googlegroups.com>
3674 error System Windows_NT 5.1.2600
3675 error command "E:\\nodejs\\\\node.exe" "E:\\nodejs\\node_modules\\npm\\bin\\npm-
cli.js" "install" "express" "-g"
3676 error cwd C:\DOCUME~1\Admin
3677 error node -v v0.10.2
3678 error npm -v 1.2.16
3679 error syscall read
3680 error code ECONNRESET
3681 error errno ECONNRESET
3682 verbose exit [ 1, true ]

Related

Error: CERT_UNTRUSTED while trying to install Node-Red

When i try to install Node-Red with
sudo npm install -g --unsafe-perm node-red
i get an Error:
GET https://registry.npmjs.org/node-red
GET https://registry.npmjs.org/node-red
GET https://registry.npmjs.org/node-red
Error: CERT_UNTRUSTED
at TLSSocket.<anonymous> (_tls_wrap.js:644:36)
at TLSSocket.EventEmitter.emit (events.js:100:17)
at TLSSocket._finishInit (_tls_wrap.js:275:8)
If you need help, you may report this log at:
<http://github.com/isaacs/npm/issues>
or email it to:
<npm-#googlegroups.com>
System Linux 3.14.60-fslc-imx6-sr
command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "-g" "--unsafe-perm" "node-red"
cwd /home/debian
node -v v0.11.7
npm -v 1.3.8
Additional logging details can be found in:
/home/debian/npm-debug.lgo
not ok code 0
Btw. the versions of node and npm seems to be wrong, i have node v10.13.0 and npm 6.4.1
although in the error message it shows something else (?)

how to avoid error during bower installation?

I am trying to install bower in windows 7:
npm install bower -g
It returns with this error:
error Error: No compatible version found: bower-endpoint-parser#'^0.2.2'
1073 error Valid install targets:
1073 error ["0.1.0-rc.1","0.1.0","0.2.0","0.2.1","0.2.2"]
1073 error at installTargetsError (C:\Users\myname\node-0.10.4\node-0.10.4\node_modules\npm\lib\cache.js:685:10)
1073 error at C:\Users\myname\node-0.10.4\node-0.10.4\node_modules\npm\lib\cache.js:607:10
1073 error at saved (C:\Users\myname\node-0.10.4\node-0.10.4\node_modules\npm\node_modules\npm-registry-client\lib\get.js:138:7)
1073 error at Object.oncomplete (fs.js:107:15)
1074 error If you need help, you may report this log at:
1074 error <http://github.com/isaacs/npm/issues>
1074 error or email it to:
1074 error <npm-#googlegroups.com>
1075 error System Windows_NT 6.1.7601
1076 error command "C:\\Users\\myname\\node-0.10.4\\node-0.10.4\\\\node.exe" "C:\\Users\\myname\\node-0.10.4\\node-0.10.4\\node_modules\\npm\\bin\\npm-cli.js" "install" "bower"
1077 error cwd C:\Users\myname\BowerJS
1078 error node -v v0.10.4
1079 error npm -v 1.2.18
You have a pretty old version of NPM (1.2). NPM notoriously has problems with Windows, e.g. because of long file paths which are not allowed on Windows.
First try cleaning the cache and retrying with npm -g cache clean and then update npm before other steps

Error while installing phonegap on Mac

I am using Mac machine
Running the following command which i got from phonegap site.
sudo npm install -g phonegap
But getting the error as follows
8398 error Error: ENOENT, lstat
'/usr/local/lib/node_modules/phonegap/node_modules/connect-phonegap/node_modules/archiver/node_modules/readable-stream/lib/_stream_writable.js'
8399 error If you need help, you may report this log at: 8399 error
http://github.com/isaacs/npm/issues 8399 error or email it to: 8399
error 8400 error System Darwin 14.0.0 8401
error command "/usr/local/bin/node" "/usr/local/bin/npm" "install"
"-g" "phonegap" 8402 error cwd /Users/bunty 8403 error node -v v0.10.0
8404 error npm -v 1.2.14 8405 error path
/usr/local/lib/node_modules/phonegap/node_modules/connect-phonegap/node_modules/archiver/node_modules/readable-stream/lib/_stream_writable.js 8406 error fstream_path
/usr/local/lib/node_modules/phonegap/node_modules/connect-phonegap/node_modules/archiver/node_modules/readable-stream/lib/_stream_writable.js 8407 error fstream_type File 8408 error fstream_class FileWriter 8409
error code ENOENT 8410 error errno 34 8411 error fstream_stack
/usr/local/lib/node_modules/npm/node_modules/fstream/lib/writer.js:284:26
8411 error fstream_stack Object.oncomplete (fs.js:93:15) 8412 verbose
exit [ 34, true ]
Can anyone help on this?
Thanks in advance

Can't launch nodejs + express basic program

I am having a bit of trouble with a basic nodejs and express program.
The problem is when I use npm start which should run node .\bin\www I get these errors:
C:\Users\{USRNAME}\Desktop\projets\cdc\cdc-api>npm start
cdc-api#0.0.0 start C:\Users\{USRNAME}\Desktop\projets\cdc\cdc-api
node .\bin\www
events.js:72
throw er; // Unhandled 'error' event
^
Error: listen EADDRINUSE
at errnoException (net.js:904:11)
at Server._listen2 (net.js:1042:14)
at listen (net.js:1064:10)
at Server.listen (net.js:1138:5)
at Function.app.listen (C:\Users\{USRNAME}\Desktop\projets\cdc\cdc-api\node_mo
dules\express\lib\application.js:556:24)
at Object.<anonymous> (C:\Users\{USRNAME}\Desktop\projets\cdc\cdc-api\bin\www:
7:18)
at Module._compile (module.js:456:26)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
npm ERR! cdc-api#0.0.0 start: `node .\bin\www`
npm ERR! Exit status 8
npm ERR!
npm ERR! Failed at the cdc-api#0.0.0 start script.
npm ERR! This is most likely a problem with the cdc-api package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node .\bin\www
npm ERR! You can get their info via:
npm ERR! npm owner ls cdc-api
npm ERR! There is likely additional logging output above.
npm ERR! System Windows_NT 6.2.9200
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nod
ejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
npm ERR! cwd C:\Users\{USRNAME}\Desktop\projets\cdc\cdc-api
npm ERR! node -v v0.10.32
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! C:\Users\{USRNAME}\Desktop\projets\cdc\cdc-api\npm-debug.log
npm ERR! not ok code 0
C:\Users\{USRNAME}\Desktop\projets\cdc\cdc-api>
and here is what I have in npm-debug.log:
0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\\\node.exe',
1 verbose cli 'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'start' ]
2 info using npm#1.4.28
3 info using node#v0.10.32
4 verbose node symlink C:\Program Files\nodejs\\node.exe
5 verbose run-script [ 'prestart', 'start', 'poststart' ]
6 info prestart cdc-api#0.0.0
7 info start cdc-api#0.0.0
8 verbose unsafe-perm in lifecycle true
9 info cdc-api#0.0.0 Failed to exec start script
10 error cdc-api#0.0.0 start: `node .\bin\www`
10 error Exit status 8
11 error Failed at the cdc-api#0.0.0 start script.
11 error This is most likely a problem with the cdc-api package,
11 error not with npm itself.
11 error Tell the author that this fails on your system:
11 error node .\bin\www
11 error You can get their info via:
11 error npm owner ls cdc-api
11 error There is likely additional logging output above.
12 error System Windows_NT 6.2.9200
13 error command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "start"
14 error cwd C:\Users\Moucheg\Desktop\projets\cdc\cdc-api
15 error node -v v0.10.32
16 error npm -v 1.4.28
17 error code ELIFECYCLE
18 verbose exit [ 1, true ]
I have tried everything I found on internet (reinstall node, recreate package.json, ...) I can't get it to work.
FYI, I am on Windows 8 (if it's of any help)
Thank you in advance for your help guys (and girls ;)).
The error "EADDRINUSE" means the port you're attempting to use is already in use by your system. Try changing the port used in your app or closing whatever program is using it.
The error means that the port is currently in use.
Update the code to use a different port. Often times, node.js/express samples assign the port in app.js.
EADDRINUSE happens when your code is using the same port of another program.
You can try to use another port to see if the problem is resolved.

Push to Heroku failed - error fsevents#0.2.0 install: `node-gyp rebuild`

I'm trying to push my app to Heroku but I keep getting this error, looks like an issue with node-gyp but no idea how to go about fixing it.
2854 verbose rebuildBundles fsevents#0.2.0
2855 verbose rebuildBundles [ 'nan' ]
2856 info install fsevents#0.2.0
2857 verbose unsafe-perm in lifecycle true
2858 info fsevents#0.2.0 Failed to exec install script
2859 error fsevents#0.2.0 install: `node-gyp rebuild`
2859 error Exit status 1
2860 error Failed at the fsevents#0.2.0 install script.
2860 error This is most likely a problem with the fsevents package,
2860 error not with npm itself.
2860 error Tell the author that this fails on your system:
2860 error node-gyp rebuild
2860 error You can get their info via:
2860 error npm owner ls fsevents
2860 error There is likely additional logging output above.
2861 error System Linux 3.8.11-ec2
2862 error command "/tmp/build_31f84d3a-9303-49cd-9596-cc7e984d9e18/vendor/node/bin/node" "/tmp/build_31f84d3a-9303-49cd-9596-cc7e984d9e18/vendor/node/bin/npm" "rebuild"
2863 error cwd /tmp/build_31f84d3a-9303-49cd-9596-cc7e984d9e18
2864 error node -v v0.10.28
2865 error npm -v 1.4.9
2866 error code ELIFECYCLE
2867 verbose exit [ 1, true ]
! Push rejected, failed to compile Node.js app
fsevents is a Mac OS X only extension and fails to install on Heroku (Linux). Try making the dependency optional using optionalDependencies in package.json.

Resources