johntitus / coinx

Buy, sell, and find the best prices for crypto-currencies from multiple markets.
MIT License
151 stars 37 forks source link

Error: Cannot find module 'C:\index-config' #13

Closed driftfox closed 6 years ago

driftfox commented 6 years ago

I just installed coinx and when trying to configure it with my API keys, I get the following error message:

C:\>coinx config poloniex
module.js:487
    throw err;
    ^

Error: Cannot find module 'C:\index-config'
    at Function.Module._resolveFilename (module.js:485:15)
    at Function.Module._load (module.js:437:25)
    at Function.Module.runMain (module.js:605:10)
    at startup (bootstrap_node.js:158:16)
    at bootstrap_node.js:575:3
driftfox commented 6 years ago

I'm using Windows 10 64-bit with node v8.0.0

johntitus commented 6 years ago

Is coinx installed globally?

driftfox commented 6 years ago

Yes; I installed it globally. After opening this bug, I saw the comment from @jgfaust on issue #4 about renaming all coinx-.js files to index-.js in the root directory. I forked your project and gave that a shot. This fixed the problem in Windows, but when I tested it in Linux, I'm now getting an error message saying coinx-config(1) does not exist, try --help.

johntitus commented 6 years ago

Interesting. I don't have access to a Windows machine - would you mind trying something for me?

Seems to work ok on linux, perhaps it will help on windows too?

johntitus commented 6 years ago

If that doesn't work, can you try changing package.json to use commander 2.6.0? Looks like the issue may be related.

driftfox commented 6 years ago

Renaming the index.js file seemed to work great. Thank you!