When trying to deploy to Heroku I didn't have a problem however when trying to access my Heroku URL I got an "Application error". After executing heroku logs, I got the error Cannot find module 'async'. I installed it and I am async/await only inside this function. Could someone help me solve this issue?
const express = require('express');
const router = express.Router();
const Rental = require('../models/rental');
const User = require('../models/user');
const { normalizedErrors } = require('../helpers/mongoose')
var flatten = require('array-flatten')
var Promise = require('Promise');
var async = require('async');
router.get('', async function (req, res) {
let finalResults = [];
let dummyArray = [''];
let resolvedFinalArray = await Promise.all(dummyArray.map(async (value) => {
const result = await getRentalsByQuery({});
finalValue = result;
return finalValue;
}));
finalResults.push(resolvedFinalArray);
finalResults = flatten(finalResults);
if (req.query.filters) {
const queryObj = JSON.parse(req.query.filters);
if (queryObj.title) {
// SOME ASYNC OPERATIONS with foundRentals
}
}
//clean resolvedFinalArray for sending as a simple array json
finalResults = flatten(finalResults)
res.json(finalResults);
});
Here is the error detail:
2018-12-08T06:09:01.416754+00:00 app[web.1]:
2018-12-08T06:09:02.649330+00:00 app[web.1]: internal/modules/cjs/loader.js:582
2018-12-08T06:09:02.649344+00:00 app[web.1]: throw err;
2018-12-08T06:09:02.649346+00:00 app[web.1]: ^
2018-12-08T06:09:02.649347+00:00 app[web.1]:
2018-12-08T06:09:02.649348+00:00 app[web.1]: Error: Cannot find module 'async'
2018-12-08T06:09:02.649350+00:00 app[web.1]: at Function.Module._resolveFilename (internal/modules/cjs/loader.js:580:15)
2018-12-08T06:09:02.649351+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:506:25)
2018-12-08T06:09:02.649353+00:00 app[web.1]: at Module.require (internal/modules/cjs/loader.js:636:17)
2018-12-08T06:09:02.649354+00:00 app[web.1]: at require (internal/modules/cjs/helpers.js:20:18)
2018-12-08T06:09:02.649355+00:00 app[web.1]: at Object.<anonymous> (/app/server/routes/rentals.js:8:13)
2018-12-08T06:09:02.649357+00:00 app[web.1]: at Module._compile (internal/modules/cjs/loader.js:688:30)
2018-12-08T06:09:02.649358+00:00 app[web.1]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
2018-12-08T06:09:02.649359+00:00 app[web.1]: at Module.load (internal/modules/cjs/loader.js:598:32)
2018-12-08T06:09:02.649361+00:00 app[web.1]: at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
2018-12-08T06:09:02.649362+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:529:3)
2018-12-08T06:09:02.649363+00:00 app[web.1]: at Module.require (internal/modules/cjs/loader.js:636:17)
2018-12-08T06:09:02.649364+00:00 app[web.1]: at require (internal/modules/cjs/helpers.js:20:18)
2018-12-08T06:09:02.649365+00:00 app[web.1]: at Object.<anonymous> (/app/server/index.js:8:22)
2018-12-08T06:09:02.649367+00:00 app[web.1]: at Module._compile (internal/modules/cjs/loader.js:688:30)
2018-12-08T06:09:02.649368+00:00 app[web.1]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
2018-12-08T06:09:02.649369+00:00 app[web.1]: at Module.load (internal/modules/cjs/loader.js:598:32)
2018-12-08T06:09:02.672674+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2018-12-08T06:09:02.673564+00:00 app[web.1]: npm ERR! errno 1
2018-12-08T06:09:02.676119+00:00 app[web.1]: npm ERR! server#1.0.0 start: `node index.js`
2018-12-08T06:09:02.676416+00:00 app[web.1]: npm ERR! Exit status 1
2018-12-08T06:09:02.677167+00:00 app[web.1]: npm ERR!
2018-12-08T06:09:02.677417+00:00 app[web.1]: npm ERR! Failed at the server#1.0.0 start script.
2018-12-08T06:09:02.677805+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2018-12-08T06:09:02.696205+00:00 app[web.1]: npm WARN Local package.json exists, but node_modules missing, did you mean to install?
2018-12-08T06:09:02.697621+00:00 app[web.1]:
2018-12-08T06:09:02.698037+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2018-12-08T06:09:02.698297+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2018-12-08T06_09_02_682Z-debug.log
2018-12-08T06:09:02.713718+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2018-12-08T06:09:02.714599+00:00 app[web.1]: npm ERR! errno 1
2018-12-08T06:09:02.718363+00:00 app[web.1]: npm ERR! angular-starter#0.0.0 start: `npm run start --prefix server`
2018-12-08T06:09:02.718847+00:00 app[web.1]: npm ERR! Exit status 1
2018-12-08T06:09:02.719560+00:00 app[web.1]: npm ERR!
2018-12-08T06:09:02.719990+00:00 app[web.1]: npm ERR! Failed at the angular-starter#0.0.0 start script.
2018-12-08T06:09:02.720570+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2018-12-08T06:09:02.735159+00:00 app[web.1]:
2018-12-08T06:09:02.735523+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2018-12-08T06:09:02.735769+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2018-12-08T06_09_02_724Z-debug.log
2018-12-08T06:09:14.369444+00:00 app[web.1]:
2018-12-08T06:09:14.369473+00:00 app[web.1]: > angular-starter#0.0.0 start /app
2018-12-08T06:09:14.369475+00:00 app[web.1]: > npm run start --prefix server
2018-12-08T06:09:14.369477+00:00 app[web.1]:
2018-12-08T06:09:15.403449+00:00 app[web.1]:
2018-12-08T06:09:15.403494+00:00 app[web.1]: > server#1.0.0 start /app/server
2018-12-08T06:09:15.403496+00:00 app[web.1]: > node index.js
2018-12-08T06:09:15.403497+00:00 app[web.1]:
Check 'async' in node_modules ,because your loader log "Cannot find module 'async'"
first npm i --save async, then restart your app
Related
When I start my project via Heroku I am getting an error saying that "app" is not defined. I have logged "app" and get data back so I do not know why this is happening. Has anyone had this issue before? Here are the errors and the code:
State changed from starting to crashed
2021-05-05T22:16:42.626715+00:00 app[web.1]: /app/listen.js:3
2021-05-05T22:16:42.626744+00:00 app[web.1]: app.listen(PORT, () => console.log(`Listening on ${PORT}...`));
2021-05-05T22:16:42.626745+00:00 app[web.1]: ^
2021-05-05T22:16:42.626745+00:00 app[web.1]:
2021-05-05T22:16:42.626751+00:00 app[web.1]: ReferenceError: app is not defined
2021-05-05T22:16:42.626752+00:00 app[web.1]: at Object.<anonymous> (/app/listen.js:3:1)
2021-05-05T22:16:42.626752+00:00 app[web.1]: at Module._compile (internal/modules/cjs/loader.js:1063:30)
2021-05-05T22:16:42.626758+00:00 app[web.1]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
2021-05-05T22:16:42.626758+00:00 app[web.1]: at Module.load (internal/modules/cjs/loader.js:928:32)
2021-05-05T22:16:42.626759+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:769:14)
2021-05-05T22:16:42.626764+00:00 app[web.1]: at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
2021-05-05T22:16:42.626765+00:00 app[web.1]: at internal/main/run_main_module.js:17:47
2021-05-05T22:16:42.652119+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2021-05-05T22:16:42.652547+00:00 app[web.1]: npm ERR! errno 1
2021-05-05T22:16:42.661700+00:00 app[web.1]: npm ERR! be-nc-news#1.0.0 start: `node listen.js`
2021-05-05T22:16:42.661926+00:00 app[web.1]: npm ERR! Exit status 1
2021-05-05T22:16:42.662168+00:00 app[web.1]: npm ERR!
2021-05-05T22:16:42.662387+00:00 app[web.1]: npm ERR! Failed at the be-nc-news#1.0.0 start script.
2021-05-05T22:16:42.662587+00:00 app[web.1]: npm ERR! This is probably not a problem with npm.
app.js:
const express = require("express");
const apiRouter = require("./routes/apiRouter");
const app = express();
const {
handlePsqlErrors,
handleServerErrors,
} = require("./errorHandlingFunctions/errorFunctions");
app.use(express.json());
app.use("/api", apiRouter);
app.use(handlePsqlErrors);
app.use(handleServerErrors);
module.exports = app;
listen.js:
const app = require("./app");
console.log(app);
const { PORT = 9090 } = process.env;
app.listen(PORT, () => console.log(`Listening on port ${PORT}...`));
This is the error it gives me when I deploy to heroku
It is says that I should check the file "localScrape.js" on line 11 column 21.
I went and included a try/catch block to work my way around it but it is persistently giving me the same error could.
2020-10-02T14:06:40.613205+00:00 app[web.1]: > node index
2020-10-02T14:06:40.613205+00:00 app[web.1]:
2020-10-02T14:06:41.196275+00:00 app[web.1]: Innitializing.....
2020-10-02T14:06:41.197532+00:00 app[web.1]: Starting the server....
2020-10-02T14:06:41.197609+00:00 app[web.1]: Server started..
2020-10-02T14:06:41.197667+00:00 app[web.1]: Server Listening on port 4000
2020-10-02T14:06:41.950485+00:00 app[web.1]: DB Connected successfully
2020-10-02T14:06:47.624092+00:00 app[web.1]: events.js:292
2020-10-02T14:06:47.624104+00:00 app[web.1]: throw er; // Unhandled 'error' event
2020-10-02T14:06:47.624105+00:00 app[web.1]: ^
2020-10-02T14:06:47.624105+00:00 app[web.1]:
2020-10-02T14:06:47.624106+00:00 app[web.1]: Error: read ENOTCONN
2020-10-02T14:06:47.624106+00:00 app[web.1]: at tryReadStart (net.js:573:20)
2020-10-02T14:06:47.624107+00:00 app[web.1]: at Socket._read (net.js:584:5)
2020-10-02T14:06:47.624107+00:00 app[web.1]: at Socket.Readable.read (_stream_readable.js:467:10)
2020-10-02T14:06:47.624108+00:00 app[web.1]: at Socket.read (net.js:624:39)
2020-10-02T14:06:47.624108+00:00 app[web.1]: at new Socket (net.js:376:12)
2020-10-02T14:06:47.624109+00:00 app[web.1]: at Object.Socket (net.js:267:41)
2020-10-02T14:06:47.624109+00:00 app[web.1]: at createSocket (internal/child_process.js:314:14)
2020-10-02T14:06:47.624109+00:00 app[web.1]: at ChildProcess.spawn (internal/child_process.js:437:23)
2020-10-02T14:06:47.624110+00:00 app[web.1]: at Object.spawn (child_process.js:548:9)
2020-10-02T14:06:47.624110+00:00 app[web.1]: at BrowserRunner.start (/app/node_modules/puppeteer/lib/launcher/BrowserRunner.js:51:34)
2020-10-02T14:06:47.624111+00:00 app[web.1]: at ChromeLauncher.launch (/app/node_modules/puppeteer/lib/Launcher.js:64:16)
2020-10-02T14:06:47.624111+00:00 app[web.1]: at async localScrape (/app/Scraper/localScrape.js:11:21)
2020-10-02T14:06:47.624111+00:00 app[web.1]: at async doScraping (/app/index.js:20:3)
2020-10-02T14:06:47.624112+00:00 app[web.1]: Emitted 'error' event on Socket instance at:
2020-10-02T14:06:47.624112+00:00 app[web.1]: at emitErrorNT (internal/streams/destroy.js:92:8)
2020-10-02T14:06:47.624112+00:00 app[web.1]: at emitErrorAndCloseNT (internal/streams/destroy.js:60:3)
2020-10-02T14:06:47.624113+00:00 app[web.1]: at processTicksAndRejections (internal/process/task_queues.js:84:21) {
2020-10-02T14:06:47.624113+00:00 app[web.1]: errno: 'ENOTCONN',
2020-10-02T14:06:47.624114+00:00 app[web.1]: code: 'ENOTCONN',
2020-10-02T14:06:47.624114+00:00 app[web.1]: syscall: 'read'
2020-10-02T14:06:47.624114+00:00 app[web.1]: }
2020-10-02T14:06:47.643941+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2020-10-02T14:06:47.644301+00:00 app[web.1]: npm ERR! errno 1
2020-10-02T14:06:47.648553+00:00 app[web.1]: npm ERR! scraping-script-for-news#1.0.0 start: `node index`
2020-10-02T14:06:47.648770+00:00 app[web.1]: npm ERR! Exit status 1
2020-10-02T14:06:47.649014+00:00 app[web.1]: npm ERR!
2020-10-02T14:06:47.649222+00:00 app[web.1]: npm ERR! Failed at the scraping-script-for-news#1.0.0 start script.
2020-10-02T14:06:47.649428+00:00 app[web.1]: npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
2020-10-02T14:06:49.194170+00:00 app[web.1]:
2020-10-02T14:06:49.194363+00:00 app[web.1]: npm ERR! A complete log of this run can be found in:
2020-10-02T14:06:49.194480+00:00 app[web.1]: npm ERR! /app/.npm/_logs/2020-10-02T14_06_47_651Z-debug.log
2020-10-02T14:06:49.249822+00:00 heroku[web.1]: Process exited with status 1
2020-10-02T14:06:49.281443+00:00 heroku[web.1]: State changed from starting to crashed```
I am working in node Js. When im trying to load a file, with this lines:
key: fs.readFileSync('./localCerts/local.dev.key'),
cert: fs.readFileSync('./localCerts/local.dev.crt'),
This is error appeards when I try to rub application:
bou-frontend#0.0.1 start /Users/nikolatrajkovic/Desktop/projects/bou-frontend/bou-frontend
node src/index.js
fs.js:114
throw err;
^
Error: ENOENT: no such file or directory, open
'/Users/nikolatrajkovic/Desktop/projects/bou-frontend/bou-frontend/build/index.html'
at Object.openSync (fs.js:438:3)
at readFileSync (fs.js:343:35)
at Object. (/Users/nikolatrajkovic/Desktop/projects/bou-frontend/bou-frontend/src/ssr.js:34:22)
at Module._compile (internal/modules/cjs/loader.js:701:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:712:10)
at Module.load (internal/modules/cjs/loader.js:600:32)
at tryModuleLoad (internal/modules/cjs/loader.js:539:12)
at Function.Module._load (internal/modules/cjs/loader.js:531:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! bou-frontend#0.0.1 start: node
src/index.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the
bou-frontend#0.0.1 start script. npm ERR! This is probably not a
problem with npm. There is likely additional logging output above.
PACKAGE.json file:
scripts": {
"start": "node src/index.js",
}
Any advice or help is welcome.
I'm new to nodejs, trying to make an API by walking through the guide, but got an issue I can't resolve even with google tho.
Here's my command line text.
consign v0.1.2 Initialized in d:\Jinn\API
+ .\libs\config.js
+ .\db.js
+ .\libs\middlewares.js
+ .\routes\index.js
+ .\routes\tasks.js
+ .\libs\boot.js
d:\Jinn\API\db.js:22
sequelize = new _sequelize2.default(config.database, config.username, config
.password, config.params);
^
ReferenceError: sequelize is not defined
at Function.module.exports (d:/Jinn/API/db.js:10:5)
at Consign.into (d:\Jinn\API\node_modules\consign\lib\consign.js:239
:17)
at Object.<anonymous> (d:/Jinn/API/index.js:13:4)
at Module._compile (module.js:570:32)
at loader (d:\Jinn\API\node_modules\babel-register\lib\node.js:144:5
)
at Object.require.extensions.(anonymous function) [as .js] (d:\Jinn\API\node_modules\babel-register\lib\node.js:154:7)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Function.Module.runMain (module.js:604:10)
at d:\Jinn\API\node_modules\babel-cli\lib\_babel-node.js:161:27
at Object.<anonymous> (d:\Jinn\API\node_modules\babel-cli\lib\_babel
-node.js:162:7)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
npm ERR! Windows_NT 6.3.9600
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\
node_modules\\npm\\bin\\npm-cli.js" "start"
npm ERR! node v6.11.2
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE
npm ERR! api#1.0.0 start: `babel-node index.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the api#1.0.0 start script 'babel-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 bitskinsapi package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! babel-node index.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs api
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls api
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! d:\Jinn\API\npm-debug.log
Seems that troubles are somewhere in db.js file so here is the code of it:
import fs from "fs";
import path from "path";
import Sequelize from "sequelize";
let db = null;
module.exports = app => {
if (!db) {
const config = app.libs.config;
sequelize = new Sequelize(
config.database,
config.username,
config.password,
config.params
);
db = {
sequelize,
Sequelize,
models: {}
};
// Загрузка моделей
const dir = path.join(__dirname, "models");
fs.readdirSync(dir).forEach(file => {
const modelDir = path.join(dir, file);
const model = sequelize.import(modelDir);
db.models[model.name] = model;
});
Object.keys(db.models).forEach(key => {
db.models[key].associate(db.models);
});
}
return db;
};
To tell the truth I mostly followed instructions and copy-pasted code fragments that's why I'm frustrated because it should work. Any thoughts?
My Heroku app is crashing, I believe before it even gets to the Procfile. I am experiencing the same problem as here:
Cannot execute Node.js app on Heroku successfully (crashes each time)
The only difference is that my package.json file has Express included
package.json
{
"name": "weathersocket",
"version": "0.0.1",
"description": "text based weather",
"main": "weather.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
"type": "git",
"url": "https://github.com/agreen757/weathersocket.github.io"
},
"keywords": [
"demo",
"heroku",
"weather"
],
"author": "Adrian Green",
"license": "MIT",
"bugs": {
"url": "https://github.com/agreen757/weathersocket.github.io/issues"
},
"homepage": "https://github.com/agreen757/weathersocket.github.io",
"dependencies": {
"body-parser": "^1.6.6",
"consolidate": "^0.10.0",
"cookie-parser": "^1.3.2",
"express": "^4.8.6",
"mongodb": "^1.4.9",
"socket.io": "^1.0.6",
"swig": "^1.4.2"
}
}
I have tried to the foreman utility locally and everything works properly.
My main weather.js file contains:
server.listen(4000);
console.log("Express server started on 4000");
Any help would be greatly appreciated.
Update: Heroku logs
`2014-08-28T14:29:14.866955+00:00 heroku[web.1]: State changed from crashed to starting
2014-08-28T14:29:18.414238+00:00 app[web.1]:
2014-08-28T14:29:18.414259+00:00 app[web.1]: > node weather.js
2014-08-28T14:29:18.414257+00:00 app[web.1]: > weathersocket#10.3.1 start /app
2014-08-28T14:29:18.414260+00:00 app[web.1]:
2014-08-28T14:29:18.755300+00:00 app[web.1]:
2014-08-28T14:29:18.755380+00:00 app[web.1]: module.js:340
2014-08-28T14:29:18.755637+00:00 app[web.1]: throw err;
2014-08-28T14:29:18.755646+00:00 app[web.1]: ^
2014-08-28T14:29:18.757013+00:00 app[web.1]: at Function.Module._resolveFilename (module.js:338:15)
2014-08-28T14:29:18.757015+00:00 app[web.1]: at Function.Module._load (module.js:280:25)
2014-08-28T14:29:18.757011+00:00 app[web.1]: Error: Cannot find module 'socket.io'
2014-08-28T14:29:18.757016+00:00 app[web.1]: at Module.require (module.js:364:17)
2014-08-28T14:29:18.757017+00:00 app[web.1]: at require (module.js:380:17)
2014-08-28T14:29:18.757019+00:00 app[web.1]: at Object.<anonymous> (/app/weather.js:6:10)
2014-08-28T14:29:18.757020+00:00 app[web.1]: at Module._compile (module.js:456:26)
2014-08-28T14:29:18.757022+00:00 app[web.1]: at Object.Module._extensions..js (module.js:474:10)
2014-08-28T14:29:18.757023+00:00 app[web.1]: at Module.load (module.js:356:32)
2014-08-28T14:29:18.757025+00:00 app[web.1]: at Function.Module._load (module.js:312:12)
2014-08-28T14:29:18.757026+00:00 app[web.1]: at Function.Module.runMain (module.js:497:10)
2014-08-28T14:29:18.765774+00:00 app[web.1]:
2014-08-28T14:29:18.770873+00:00 app[web.1]: npm ERR!
2014-08-28T14:29:18.770460+00:00 app[web.1]: npm ERR! weathersocket#10.3.1 start: `node weather.js`
2014-08-28T14:29:18.770720+00:00 app[web.1]: npm ERR! Exit status 8
2014-08-28T14:29:18.770945+00:00 app[web.1]: npm ERR! Failed at the weathersocket#10.3.1 start script.
2014-08-28T14:29:18.771539+00:00 app[web.1]: npm ERR! This is most likely a problem with the weathersocket package,
2014-08-28T14:29:18.771696+00:00 app[web.1]: npm ERR! not with npm itself.
2014-08-28T14:29:18.771844+00:00 app[web.1]: npm ERR! Tell the author that this fails on your system:
2014-08-28T14:29:18.772002+00:00 app[web.1]: npm ERR! node weather.js
2014-08-28T14:29:18.772821+00:00 app[web.1]: npm ERR! System Linux 3.8.11-ec2
2014-08-28T14:29:18.773778+00:00 app[web.1]: npm ERR! npm -v 1.4.23
2014-08-28T14:29:18.772468+00:00 app[web.1]: npm ERR! There is likely additional logging output above.
2014-08-28T14:29:18.773030+00:00 app[web.1]: npm ERR! command "/app/vendor/node/bin/node" "/app/vendor/node/bin/npm" "start"
2014-08-28T14:29:18.773608+00:00 app[web.1]: npm ERR! node -v v0.10.31
2014-08-28T14:29:18.772297+00:00 app[web.1]: npm ERR! npm owner ls weathersocket
2014-08-28T14:29:18.775689+00:00 app[web.1]: npm ERR! Additional logging details can be found in:
2014-08-28T14:29:18.772151+00:00 app[web.1]: npm ERR! You can get their info via:
2014-08-28T14:29:18.773383+00:00 app[web.1]: npm ERR! cwd /app
2014-08-28T14:29:18.775539+00:00 app[web.1]: npm ERR!
2014-08-28T14:29:18.773965+00:00 app[web.1]: npm ERR! code ELIFECYCLE
2014-08-28T14:29:18.776097+00:00 app[web.1]: npm ERR! not ok code 0
2014-08-28T14:29:18.775840+00:00 app[web.1]: npm ERR! /app/npm-debug.log
2014-08-28T14:29:19.793237+00:00 heroku[web.1]: State changed from starting to crashed
2014-08-28T14:29:16.891824+00:00 heroku[web.1]: Starting process with command `npm start`
2014-08-28T14:29:19.781258+00:00 heroku[web.1]: Process exited with status 1`
I see a few things you could improve, as fakemeta states in his commentary, you should be using the heroku variables to listen port and to have the IP.
You should also include in your package.json:
"scripts": {
"start": "node server.js"
},
"main": "server.js"
So the system know what to do and where is your express server
//-------------EDIT----------------------------//
Cant you try to deploy without node_modules folder?, once you push heroku will install those packages, i mean at least just for debugging purposes