lpinca / binb

:notes: Competitive, multiplayer, realtime, guess the song game
https://binb.co
MIT License
291 stars 61 forks source link

npm run import-data error #22

Closed dipenpatel235 closed 8 years ago

dipenpatel235 commented 8 years ago

npm run import-data

binb@1.0.6 import-data /usr/local/nginx/html/binb node util/load_sample_tracks.js

Loading sample tracks... events.js:72 throw er; // Unhandled 'error' event ^ Error: connect ETIMEDOUT at errnoException (net.js:905:11) at Object.afterConnect as oncomplete

npm ERR! Linux 3.10.0-327.18.2.el7.x86_64 npm ERR! argv "node" "/usr/bin/npm" "run" "import-data" npm ERR! node v0.10.42 npm ERR! npm v3.10.5 npm ERR! code ELIFECYCLE npm ERR! binb@1.0.6 import-data: node util/load_sample_tracks.js npm ERR! Exit status 8 npm ERR! npm ERR! Failed at the binb@1.0.6 import-data script 'node util/load_sample_tracks.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 binb package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node util/load_sample_tracks.js npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs binb npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls binb npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR! /usr/local/nginx/html/binb/npm-debug.log

lpinca commented 8 years ago

I guess this happens because I didn't add an error handler to the request object. The error means that the connection timed out. The best way to handle this would be to retry the request and bail out after a maximum number of attempts but I don't want to add this complexity. The load script is only there to show the db structure and to provide a way to easily start the app.