简体   繁体   中英

Heroku Error Loading Node Application with AWS-SDK

My MEAN stack app is working perfectly locally but when I push it to Heroku where I'm hosting it I get "Application Error". This is the output I get when I do heroku logs --tail in my Terminal.

State changed from crashed to starting
Starting process with command `node app.js`
module.js:471
throw err;
^
Error: Cannot find module '../object/keys'
at Function.Module._resolveFilename (module.js:469:15)
at Function.Module._load (module.js:417:25)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/app/node_modules/aws-sdk/node_modules/xmlbuilder/node_modules/lodash/internal/baseAssign.js:2:12)
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)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
at require (internal/module.js:20:19)
at Object.<anonymous> (/app/node_modules/aws-sdk/node_modules/xmlbuilder/node_modules/lodash/object/assign.js:1:80)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Module.load (module.js:487:32)

Typically you want to set up Heroku in the early stages of the app development to prevent any crazy errors. Your dependencies might be triggering this. I would try Digital Ocean as an alternative to Heroku.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM