bitpay / node-bitpay-client

A Node.js module and command line client for interacting with BitPay's Cryptographically Secure API
102 stars 95 forks source link

[Heroku specific] Error: Cannot find module '/app/.bitpay/config.json' #79

Closed quantuminformation closed 8 years ago

quantuminformation commented 8 years ago

I followed the instructions pretty much to the letter and the client works fine in my local node installation.

However when deploying to Heroku I am getting this error about a missing config

: Error: Cannot find module '/app/.bitpay/config.json'
2016-06-02T16:22:24.716365+00:00 app[web.1]:     at Function.Module._resolveFilename (module.js:339:15)
2016-06-02T16:22:24.716366+00:00 app[web.1]:     at Function.Module._load (module.js:290:25)
2016-06-02T16:22:24.716367+00:00 app[web.1]:     at Module.require (module.js:367:17)
2016-06-02T16:22:24.716367+00:00 app[web.1]:     at require (internal/module.js:20:19)
2016-06-02T16:22:24.716368+00:00 app[web.1]:     at Object.<anonymous> (/app/node_modules/bitpay-rest/lib/rest-client.js:11:20)

any ideas, thanks?

maybe there could be a happy fail path if you have the object in client setup..

image

quantuminformation commented 8 years ago

Update, that specific error is gone by me creating a file like so:

image

I don't know why this is not needed in my local env.