Open ksullivan91 opened 6 years ago
I kind of solved this by cloning the repo, adding it to my project, and implementing this PR
Used https://github.com/ds300/patch-package to patch the repo as follows:
patch-package
--- a/node_modules/bitpay-rest/lib/rest-client.js
+++ b/node_modules/bitpay-rest/lib/rest-client.js
@@ -8,7 +8,12 @@ var util = require('util');
var isWin = process.platform === 'win32';
var HOME = process.env[isWin ? 'USERPROFILE' : 'HOME'];
-var defaultConf = require(HOME + '/.bitpay/config.json');
+
+try {
+ var defaultConf = require(HOME + '/.bitpay/config.json');
+} catch (e) {
+ var defaultConf = require('../config/test.json');
+}
/*
** BitPay REST Client
Worked flawlessly.
I followed the instructions while setting up the bitpay client and have no trouble running this in my local environment. However, when deploying to now.sh, I am receiving the error:
`
I have used the overloading configuration option specified in the documentation but it still tries to load the config.json file. I've created a folder named .bitpay in the root and it still isn't able to find the file.
Typically the deployment is served from '/home/nowuser/src' and bitpay is looking for the .bitpay file one level up at 'home/nowuser/.bitpay'
Any help would be appreciated!