Deploy Node-RED to Heroku - node.js

I found out the files included in the Github repo that used to connect to the Heroku server and substituted with my own package.json, flow .json, repo link in app.json. After deploying, I tried opening app and received an error from the logs window of Heroku CLI as below:
2021-04-13T10:22:01.693823+00:00 heroku[web.1]: Starting process with command `node --max-old-space-size=384 node_modules/node-red/red.js --settings ./settings.js --userDir ./`
2021-04-13T10:22:05.304911+00:00 heroku[web.1]: Process exited with status 1
2021-04-13T10:22:05.411606+00:00 heroku[web.1]: State changed from starting to crashed
2021-04-13T10:22:05.185490+00:00 app[web.1]: throw err;
2021-04-13T10:22:05.185491+00:00 app[web.1]: ^
2021-04-13T10:22:05.185491+00:00 app[web.1]:
2021-04-13T10:22:05.185492+00:00 app[web.1]: Error: Cannot find
module '/app/node_modules/node-red/red.js'
2021-04-13T10:22:05.185492+00:00 app[web.1]: at
Function.Module._resolveFilename
(internal/modules/cjs/loader.js:880:15)
2021-04-13T10:22:05.185492+00:00 app[web.1]: at
Function.Module._load (internal/modules/cjs/loader.js:725:27)
2021-04-13T10:22:05.185493+00:00 app[web.1]: at
Function.executeUserEntryPoint [as runMain]
(internal/modules/run_main.js:72:12)
2021-04-13T10:22:05.185494+00:00 app[web.1]: at
internal/main/run_main_module.js:17:47 {
2021-04-13T10:22:05.185494+00:00 app[web.1]: code:
'MODULE_NOT_FOUND',
2021-04-13T10:22:05.185495+00:00 app[web.1]: requireStack: []
2021-04-13T10:22:05.185495+00:00 app[web.1]: }
My Github repo link
Hope to get your help. Thanks.

You have removed Node-RED from the package.json, so since it's not installed it won't start.
{
"name": "node-red-project",
"description": "A Node-RED Project",
"version": "0.0.1",
"dependencies": {
"node-red-contrib-alarm": "~1.2.5",
"node-red-contrib-component-dashboard": "0.0.4",
"node-red-contrib-components": "~0.1.8",
"node-red-contrib-firebase": "~1.1.1",
"node-red-contrib-influxdb": "~0.5.1",
"node-red-contrib-mqtt-broker": "~0.2.4",
"node-red-contrib-remote": "~1.1.3",
"node-red-contrib-ttn": "~2.0.5",
"node-red-contrib-ui-svg": "~2.2.1",
"node-red-contrib-users": "~0.1.9",
"node-red-dashboard": "~2.14.0",
"node-red-node-ui-table": "~0.3.10"
}
}
If you want to add extra nodes, you need to add these to the list of dependencies in the existing package.json not just replace them.
{
"name": "nodered-heroku",
"version": "0.0.7",
"dependencies": {
"when": "3.7.8",
"nano": "8.2.2",
"feedparser":"2.2.10",
"node-red-dashboard":"2.23.3",
"redis":"3.0.2",
"node-red": "1.1.3",
"node-red-node-tail": "0.1.1",
"node-red-contrib-aedes": "0.3.6",
"node-red-contrib-blynk-ws": "1.0.3",
"node-red-node-email": "1.7.9",
"node-red-node-ui-list": "0.3.1",
"node-red-contrib-telegrambot": "8.4.0",
"node-red-contrib-alarm": "~1.2.5",
"node-red-contrib-component-dashboard": "0.0.4",
"node-red-contrib-components": "~0.1.8",
"node-red-contrib-firebase": "~1.1.1",
"node-red-contrib-influxdb": "~0.5.1",
"node-red-contrib-mqtt-broker": "~0.2.4",
"node-red-contrib-remote": "~1.1.3",
"node-red-contrib-ttn": "~2.0.5",
"node-red-contrib-ui-svg": "~2.2.1",
"node-red-contrib-users": "~0.1.9",
"node-red-node-ui-table": "~0.3.10"
}
}
I would also suggest you use the latest version of Node-RED (1.3.1 at time of posting) as 1.1.3 is VERY OLD

Related

use the Dbus package in an electron app (Build process)

i have this problem when i require DBus from the dbus package
const { app, BrowserWindow } = require("electron");
const DBus = require('dbus');
app.whenReady().then(() => {
var win = new BrowserWindow({ width: 600, height: 500 });
win.loadFile('index.html');
win.webContents.openDevTools();
});
so when i execute this code i get this error :
> electron script.js
App threw an error during load
Error: Module did not self-register: '/home/bislem/projects/test/electron/node_modules/dbus/build/Release/dbus.node'.
at process.func [as dlopen] (electron/js2c/asar.js:140:31)
at Object.Module._extensions..node (internal/modules/cjs/loader.js:1196:18)
at Object.func [as .node] (electron/js2c/asar.js:140:31)
at Module.load (internal/modules/cjs/loader.js:981:32)
at Module._load (internal/modules/cjs/loader.js:881:14)
at Function.Module._load (electron/js2c/asar.js:769:28)
at Module.require (internal/modules/cjs/loader.js:1023:19)
at require (internal/modules/cjs/helpers.js:77:18)
at Object.<anonymous> (/home/bislem/projects/test/electron/node_modules/dbus/lib/dbus.js:3:13)
at Module._compile (internal/modules/cjs/loader.js:1145:30)
A JavaScript error occurred in the main process
Uncaught Exception:
Error: Module did not self-register: '/home/bislem/projects/test/electron/node_modules/dbus/build/Release/dbus.node'.
at process.func [as dlopen] (electron/js2c/asar.js:140:31)
at Object.Module._extensions..node (internal/modules/cjs/loader.js:1196:18)
at Object.func [as .node] (electron/js2c/asar.js:140:31)
at Module.load (internal/modules/cjs/loader.js:981:32)
at Module._load (internal/modules/cjs/loader.js:881:14)
at Function.Module._load (electron/js2c/asar.js:769:28)
at Module.require (internal/modules/cjs/loader.js:1023:19)
at require (internal/modules/cjs/helpers.js:77:18)
at Object.<anonymous> (/home/bislem/projects/test/electron/node_modules/dbus/lib/dbus.js:3:13)
at Module._compile (internal/modules/cjs/loader.js:1145:30)
I searched for this error and tried some solutions but none of them worked (npm rebuild,npm update,delete the node_modules folder then npm install,use a diffrent version of node using the nvm command), but when runing each package by his own, (run electron using the start script electron ., and run dbus with node script.js) they works correctly.
and there was this when installing the dbus package :
console when installing dbus, console when installing dbus part 2
my package.json file :
{
"name": "electrontest",
"version": "1.0.0",
"description": "",
"main": "script.js",
"scripts": {
"start": "electron script.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"bootstrap": "^4.5.3",
"dbus": "^1.0.7",
"electron": "^10.1.5"
}
}
so my question is what is the correct way to Build/Run such code ? || how to use these two packages side by side ?
You need to run
npm install --save-dev electron-rebuild && npx electron-rebuild
More on using native node modules in electron here

Error: /app/node_modules/bcrypt/lib/binding/bcrypt_lib.node: invalid ELF header

I am trying to deploy my REST API to heroku. However, the application is not working. In the application log, i got this
Process exited with status 1
2019-09-23T01:09:55.744676+00:00 heroku[web.1]: Starting process with command `node server.js`
2019-09-23T01:09:58.446510+00:00 heroku[web.1]: Process exited with status 1
2019-09-23T01:09:58.468276+00:00 heroku[web.1]: State changed from starting to crashed
2019-09-23T01:09:58.370869+00:00 app[web.1]: internal/modules/cjs/loader.js:807
2019-09-23T01:09:58.370888+00:00 app[web.1]: return process.dlopen(module, path.toNamespacedPath(filename));
2019-09-23T01:09:58.370890+00:00 app[web.1]: ^
2019-09-23T01:09:58.370892+00:00 app[web.1]:
2019-09-23T01:09:58.370894+00:00 app[web.1]: Error: /app/node_modules/bcrypt/lib/binding/bcrypt_lib.node: invalid ELF header
2019-09-23T01:09:58.370896+00:00 app[web.1]: at Object.Module._extensions..node (internal/modules/cjs/loader.js:807:18)
2019-09-23T01:09:58.370898+00:00 app[web.1]: at Module.load (internal/modules/cjs/loader.js:653:32)
2019-09-23T01:09:58.370900+00:00 app[web.1]: at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
2019-09-23T01:09:58.370902+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:585:3)
2019-09-23T01:09:58.370904+00:00 app[web.1]: at Module.require (internal/modules/cjs/loader.js:692:17)
2019-09-23T01:09:58.370906+00:00 app[web.1]: at require (internal/modules/cjs/helpers.js:25:18)
2019-09-23T01:09:58.370909+00:00 app[web.1]: at Object.<anonymous> (/app/node_modules/bcrypt/bcrypt.js:6:16)
2019-09-23T01:09:58.370910+00:00 app[web.1]: at Module._compile (internal/modules/cjs/loader.js:778:30)
2019-09-23T01:09:58.370912+00:00 app[web.1]: at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
2019-09-23T01:09:58.370915+00:00 app[web.1]: at Module.load (internal/modules/cjs/loader.js:653:32)
2019-09-23T01:09:58.370917+00:00 app[web.1]: at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
2019-09-23T01:09:58.370919+00:00 app[web.1]: at Function.Module._load (internal/modules/cjs/loader.js:585:3)
2019-09-23T01:09:58.370921+00:00 app[web.1]: at Module.require (internal/modules/cjs/loader.js:692:17)
2019-09-23T01:09:58.370923+00:00 app[web.1]: at require (internal/modules/cjs/helpers.js:25:18)
2019-09-23T01:09:58.370924+00:00 app[web.1]: at Object.<anonymous> (/app/routes/auth.js:6:16)
2019-09-23T01:09:58.370926+00:00 app[web.1]: at Module._compile (internal/modules/cjs/loader.js:778:30)
This seems to have something to do with bcrypt module. I tried the solutions suggested here: https://github.com/kelektiv/node.bcrypt.js/issues/595 and https://github.com/kelektiv/node.bcrypt.js/issues/635
such as: npm rebuild bcrypt --build-from-source
here is package.json file:
{
"name": "server",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"bcrypt": "^3.0.6",
"body-parser": "^1.18.3",
"cors": "^2.8.4",
"cron": "^1.7.2",
"express": "^4.16.3",
"jsonwebtoken": "^8.3.0",
"jwt-simple": "^0.5.6",
"mapnik": "^4.3.1",
"mkdirp": "^0.5.1",
"mongoose": "^5.7.1",
"multer": "^1.4.1",
"nodemailer": "^6.3.0",
"request": "^2.88.0",
"ug": "0.0.8"
}
}
None of those solutions worked for me! How can I solve this problem?
I had the same issue, but with Docker. Turns out the node_modules folder was being uploaded. Make sure to add node_modules to your .gitignore (and/or .dockerignore)
Make .gitignore file.
Run below commands in your terminal
git rm -r --cached node_modules
git commit -am "node_modules be gone!"
git push origin main
deploy to Heroku through GitHub or CLI

Error: Cannot find module './Mime'

I am trying to get a heroku project running (following the tutorial here) and I'm running into a bit of trouble.
The node task on Heroku is throwing the following:
app[web.1]: module.js:540
app[web.1]: throw err;
app[web.1]: ^
app[web.1]:
app[web.1]: Error: Cannot find module './Mime'
app[web.1]: at Function.Module._resolveFilename (module.js:538:15)
app[web.1]: at Function.Module._load (module.js:468:25)
app[web.1]: at Module.require (module.js:587:17)
app[web.1]: at Object.<anonymous> (/app/node_modules/mime/index.js:3:12)
app[web.1]: at require (internal/module.js:11:18)
app[web.1]: at Module._compile (module.js:643:30)
app[web.1]: at Object.Module._extensions..js (module.js:654:10)
app[web.1]: at Module.load (module.js:556:32)
app[web.1]: at tryModuleLoad (module.js:499:12)
app[web.1]: at Function.Module._load (module.js:491:3)
I have installed (with -save) all of the dependencies I need including mime, but it seems like it's getting caught up with the mime module itself, here's the mime node_module:
1,545 .eslintrc.json
<DIR> .github
9,230 CHANGELOG.md
157 cli.js
127 index.js
1,098 LICENSE
101 lite.js
1,951 Mime.js
2,824 package.json
5,468 README.md
<DIR> src
<DIR> types
The mime/index.js file:
'use strict';
var Mime = require('./Mime');
module.exports = new Mime(require('./types/standard'), require('./types/other'));
and my project's dependencies
"dependencies": {
"body-parser": "^1.15.2",
"cheerio": "^1.0.0-rc.2",
"cookie-parser": "^1.4.3",
"express": "^4.14.0",
"express-handlebars": "^3.0.0",
"express-less": "^0.1.0",
"express-minify": "^0.2.0",
"favicon": "0.0.2",
"helmet": "^2.3.0",
"http": "0.0.0",
"logger": "0.0.1",
"mime": "^2.0.3",
"mongodb": "^2.2.11",
"morgan": "^1.7.0",
"nodemailer": "^4.4.1",
"nodemailer-sendgrid-transport": "^0.2.0",
"path": "^0.12.7",
"serve-favicon": "^2.3.0"
}
Thanks for your help!
Whelp, hard to say 100% what I did to fix the issue but it was probably one of the following things.
I added "engines": {"node": "7.5.0","npm": "4.1.2"} to my node package (see here)
I added a Procfile to the root with web: node server.js (see here)
as a side note, caching was a big issue for me after I solved this issue. This link may help with that.

Mongolab and Mongoose Not connecting [duplicate]

MongoDB just forced an update on my Heroku server today from 2.6 to 3.0
Now my app crashes shortly after startup with the error:
2015-10-01T10:22:27.405579+00:00 heroku[web.1]: State changed from crashed to starting
2015-10-01T10:22:42.457971+00:00 heroku[web.1]: Starting process with command `node server`
2015-10-01T10:22:46.278159+00:00 app[web.1]: memory, and will not scale past a single process.
2015-10-01T10:22:46.278136+00:00 app[web.1]: Warning: connect.session() MemoryStore is not
2015-10-01T10:22:46.278157+00:00 app[web.1]: designed for a production environment, as it will leak
2015-10-01T10:22:47.151118+00:00 app[web.1]: production server running at http://localhost:33827
2015-10-01T10:22:47.463775+00:00 heroku[web.1]: State changed from starting to up
2015-10-01T10:22:47.767430+00:00 app[web.1]: /app/node_modules/mongodb/lib/mongodb/connection/base.js:246
2015-10-01T10:22:47.767437+00:00 app[web.1]: throw message;
2015-10-01T10:22:47.767439+00:00 app[web.1]: ^
2015-10-01T10:22:47.767441+00:00 app[web.1]: MongoError: auth failed
2015-10-01T10:22:47.767443+00:00 app[web.1]: at Object.toError (/app/node_modules/mongodb/lib/mongodb/utils.js:114:11)
2015-10-01T10:22:47.767444+00:00 app[web.1]: at /app/node_modules/mongodb/lib/mongodb/db.js:1156:31
2015-10-01T10:22:47.767445+00:00 app[web.1]: at /app/node_modules/mongodb/lib/mongodb/db.js:1890:9
2015-10-01T10:22:47.767447+00:00 app[web.1]: at Server.Base._callHandler (/app/node_modules/mongodb/lib/mongodb/connection/base.js:448:41)
2015-10-01T10:22:47.767449+00:00 app[web.1]: at /app/node_modules/mongodb/lib/mongodb/connection/server.js:481:18
2015-10-01T10:22:47.767450+00:00 app[web.1]: at MongoReply.parseBody (/app/node_modules/mongodb/lib/mongodb/responses/mongo_reply.js:68:5)
2015-10-01T10:22:47.767452+00:00 app[web.1]: at null.<anonymous> (/app/node_modules/mongodb/lib/mongodb/connection/server.js:439:20)
2015-10-01T10:22:47.767453+00:00 app[web.1]: at emit (events.js:107:17)
2015-10-01T10:22:47.767455+00:00 app[web.1]: at null.<anonymous> (/app/node_modules/mongodb/lib/mongodb/connection/connection_pool.js:201:13)
2015-10-01T10:22:47.767456+00:00 app[web.1]: at emit (events.js:110:17)
2015-10-01T10:22:47.767458+00:00 app[web.1]: at Socket.<anonymous> (/app/node_modules/mongodb/lib/mongodb/connection/connection.js:439:22)
2015-10-01T10:22:47.767459+00:00 app[web.1]: at Socket.emit (events.js:107:17)
2015-10-01T10:22:47.767461+00:00 app[web.1]: at readableAddChunk (_stream_readable.js:163:16)
2015-10-01T10:22:47.767462+00:00 app[web.1]: at Socket.Readable.push (_stream_readable.js:126:10)
2015-10-01T10:22:47.767463+00:00 app[web.1]: at TCP.onread (net.js:538:20)
2015-10-01T10:22:48.687613+00:00 heroku[web.1]: Process exited with status 1
2015-10-01T10:22:48.704259+00:00 heroku[web.1]: State changed from up to crashed
I checked their status page, and found that Mongo had updated their servers to version 3.0, but also that the update should be stable now, and thus is something I need to do on my end.
After looking a bit more into it. I figured out that I'm supposed to install new "drivers" to be compatible with version 3.0.
I found this link http://docs.mongodb.org/manual/release-notes/3.0-scram/#upgrade-drivers
But it doesn't describe how exactly I can go about updating the drivers on my Heroku app.
I'm using their sandbox servers.
I tried contacting their support but they just gave me the same link.
I contacted Heroku support as well. But all they said is:
You need to make sure that the libraries you are using for Mongo
support the new version 3.0 of Mongo. It's not necessarily a 'driver'
as such
Which doesn't help me either.
Here's the contents of my package.json if that helps.
{
"name": "Stocks",
"private": true,
"version": "0.0.1",
"main": "server.js",
"engines": {
"node": "0.12.x",
"npm": "*"
},
"author": "Anom <anom#gmail.com",
"dependencies": {
"aws-sdk": "*",
"body-parser": "^1.10.1",
"connect": "^3.3.5",
"connect-flash": "^0.1.1",
"ejs": "^2.2.1",
"express": "^4.11.0",
"express-session": "^1.10.1",
"forever": "*",
"grunt": "^0.4.5",
"grunt-cli": "^0.1.13",
"grunt-contrib-jshint": "^0.11.2",
"grunt-contrib-sass": "^0.9.2",
"grunt-contrib-uglify": "^0.8.1",
"grunt-contrib-watch": "^0.6.1",
"grunt-express-server": "^0.5.1",
"grunt-ssh": "^0.12.3",
"gulp": "latest",
"mongoose": "3.8.19",
"multer": "^0.1.8",
"node-sass": "^2.1.1",
"nodemailer": "^1.3.4",
"passport": "^0.2.1",
"passport-local": "^1.0.0",
"postmark": "^1.0.0",
"request": "^2.55.0",
"stripe": "^3.3.4"
},
"devDependencies": {},
"scripts": {
"start": "node server"
}
}
Any help to figure out how I can update drivers on my Heroku app to be compatible with the new 3.0 MongoDB would be greatly appreciated.
You're using mongoose 3.8.19. The latest version of mongoose is 4.1.9. I would start there:
$ npm install --save --save-exact mongoose#4.1.9
I had the exact same problem
I did all of the above and nothing worked. Only until I deleted mongoose out of my package.json and reinstalled it thats when it worked

Heroku app crashes after MongoDB updated to 3.0

MongoDB just forced an update on my Heroku server today from 2.6 to 3.0
Now my app crashes shortly after startup with the error:
2015-10-01T10:22:27.405579+00:00 heroku[web.1]: State changed from crashed to starting
2015-10-01T10:22:42.457971+00:00 heroku[web.1]: Starting process with command `node server`
2015-10-01T10:22:46.278159+00:00 app[web.1]: memory, and will not scale past a single process.
2015-10-01T10:22:46.278136+00:00 app[web.1]: Warning: connect.session() MemoryStore is not
2015-10-01T10:22:46.278157+00:00 app[web.1]: designed for a production environment, as it will leak
2015-10-01T10:22:47.151118+00:00 app[web.1]: production server running at http://localhost:33827
2015-10-01T10:22:47.463775+00:00 heroku[web.1]: State changed from starting to up
2015-10-01T10:22:47.767430+00:00 app[web.1]: /app/node_modules/mongodb/lib/mongodb/connection/base.js:246
2015-10-01T10:22:47.767437+00:00 app[web.1]: throw message;
2015-10-01T10:22:47.767439+00:00 app[web.1]: ^
2015-10-01T10:22:47.767441+00:00 app[web.1]: MongoError: auth failed
2015-10-01T10:22:47.767443+00:00 app[web.1]: at Object.toError (/app/node_modules/mongodb/lib/mongodb/utils.js:114:11)
2015-10-01T10:22:47.767444+00:00 app[web.1]: at /app/node_modules/mongodb/lib/mongodb/db.js:1156:31
2015-10-01T10:22:47.767445+00:00 app[web.1]: at /app/node_modules/mongodb/lib/mongodb/db.js:1890:9
2015-10-01T10:22:47.767447+00:00 app[web.1]: at Server.Base._callHandler (/app/node_modules/mongodb/lib/mongodb/connection/base.js:448:41)
2015-10-01T10:22:47.767449+00:00 app[web.1]: at /app/node_modules/mongodb/lib/mongodb/connection/server.js:481:18
2015-10-01T10:22:47.767450+00:00 app[web.1]: at MongoReply.parseBody (/app/node_modules/mongodb/lib/mongodb/responses/mongo_reply.js:68:5)
2015-10-01T10:22:47.767452+00:00 app[web.1]: at null.<anonymous> (/app/node_modules/mongodb/lib/mongodb/connection/server.js:439:20)
2015-10-01T10:22:47.767453+00:00 app[web.1]: at emit (events.js:107:17)
2015-10-01T10:22:47.767455+00:00 app[web.1]: at null.<anonymous> (/app/node_modules/mongodb/lib/mongodb/connection/connection_pool.js:201:13)
2015-10-01T10:22:47.767456+00:00 app[web.1]: at emit (events.js:110:17)
2015-10-01T10:22:47.767458+00:00 app[web.1]: at Socket.<anonymous> (/app/node_modules/mongodb/lib/mongodb/connection/connection.js:439:22)
2015-10-01T10:22:47.767459+00:00 app[web.1]: at Socket.emit (events.js:107:17)
2015-10-01T10:22:47.767461+00:00 app[web.1]: at readableAddChunk (_stream_readable.js:163:16)
2015-10-01T10:22:47.767462+00:00 app[web.1]: at Socket.Readable.push (_stream_readable.js:126:10)
2015-10-01T10:22:47.767463+00:00 app[web.1]: at TCP.onread (net.js:538:20)
2015-10-01T10:22:48.687613+00:00 heroku[web.1]: Process exited with status 1
2015-10-01T10:22:48.704259+00:00 heroku[web.1]: State changed from up to crashed
I checked their status page, and found that Mongo had updated their servers to version 3.0, but also that the update should be stable now, and thus is something I need to do on my end.
After looking a bit more into it. I figured out that I'm supposed to install new "drivers" to be compatible with version 3.0.
I found this link http://docs.mongodb.org/manual/release-notes/3.0-scram/#upgrade-drivers
But it doesn't describe how exactly I can go about updating the drivers on my Heroku app.
I'm using their sandbox servers.
I tried contacting their support but they just gave me the same link.
I contacted Heroku support as well. But all they said is:
You need to make sure that the libraries you are using for Mongo
support the new version 3.0 of Mongo. It's not necessarily a 'driver'
as such
Which doesn't help me either.
Here's the contents of my package.json if that helps.
{
"name": "Stocks",
"private": true,
"version": "0.0.1",
"main": "server.js",
"engines": {
"node": "0.12.x",
"npm": "*"
},
"author": "Anom <anom#gmail.com",
"dependencies": {
"aws-sdk": "*",
"body-parser": "^1.10.1",
"connect": "^3.3.5",
"connect-flash": "^0.1.1",
"ejs": "^2.2.1",
"express": "^4.11.0",
"express-session": "^1.10.1",
"forever": "*",
"grunt": "^0.4.5",
"grunt-cli": "^0.1.13",
"grunt-contrib-jshint": "^0.11.2",
"grunt-contrib-sass": "^0.9.2",
"grunt-contrib-uglify": "^0.8.1",
"grunt-contrib-watch": "^0.6.1",
"grunt-express-server": "^0.5.1",
"grunt-ssh": "^0.12.3",
"gulp": "latest",
"mongoose": "3.8.19",
"multer": "^0.1.8",
"node-sass": "^2.1.1",
"nodemailer": "^1.3.4",
"passport": "^0.2.1",
"passport-local": "^1.0.0",
"postmark": "^1.0.0",
"request": "^2.55.0",
"stripe": "^3.3.4"
},
"devDependencies": {},
"scripts": {
"start": "node server"
}
}
Any help to figure out how I can update drivers on my Heroku app to be compatible with the new 3.0 MongoDB would be greatly appreciated.
You're using mongoose 3.8.19. The latest version of mongoose is 4.1.9. I would start there:
$ npm install --save --save-exact mongoose#4.1.9
I had the exact same problem
I did all of the above and nothing worked. Only until I deleted mongoose out of my package.json and reinstalled it thats when it worked

Resources