I created expressjs application using the following commands:
express -e folderName
npm install ejs --save
npm install
When I run the appli
I ran into the same issue today and the port was not used. The following approach helped:
rm -rf node_modules && npm cache clean && npm install
npm start
->check what’s running on port 8080 or what ever port u want to check
lsof -i @localhost:8080
if something is running u can close it or use some kill command to close it
This worked for me.
http://www.codingdefined.com/2015/09/how-to-solve-nodejs-error-listen.html
Just change the port number from the Project properties.
After killing the same process multiple times and not being able to locate what else was running on port 8000, I realized I was trying to run on port 8000 twice:
Before:
MongoClient.connect(db.url, (err, database) => {
if (err) return console.log(err);
require('./app/routes')(app, database);
app.listen(port, () => {
console.log('We are live on ' + port);
});
});
require('./app/routes')(app, {});
app.listen(port, () => {
console.log("We are live on " + port);
});
After:
MongoClient.connect(db.url, (err, database) => {
if (err) return console.log(err);
require('./app/routes')(app, database);
app.listen(port, () => {
console.log('We are live on ' + port);
});
});
require('./app/routes')(app, {});
Close any other node servers that are running, even if they are in other terminal windows or running on different ports. That should fix the problem.
events.js:183 throw er; // Unhandled 'error' event
I also got the same kind of problem and tried many ways but finally got this, this works well:
npm install ws@3.3.2 --save-dev --save-exact
Refer to this link for more clarifications https://github.com/ionic-team/ionic-cli/issues/2922