CryptoTrader
CryptoTrader copied to clipboard
Error: Cannot find module 'app'
C:\Users\Owner\Documents\TradingBot_V2\session-1>nodemon
[nodemon] 1.14.7
[nodemon] to restart at any time, enter rs
[nodemon] watching: .
[nodemon] starting node index.js
module.js:538
throw err;
^
Error: Cannot find module 'app'
at Function.Module._resolveFilename (module.js:536:15)
at Function.Module._load (module.js:466:25)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at Object.
This is the error I am getting. My knowledge of node.js is limited however I do not understand what is means by this module app not existing! I directly copied the files you had provided here.
I looks like you're using windows. You need to set the NODE_PATH to src environment variable for this to work correctly.
Here's a stack overflow Q about it, I don't have windows to hand so I can't verify but it should be something similar to this:
$ set NODE_PATH=C:\Users\Owner\Documents\TradingBot_V2\session-1\src
$ nodemon
https://stackoverflow.com/questions/9587665/nodejs-cannot-find-installed-module-on-windows
For me (Win10 user) it worked after i added the NODE_PATH to the 'environment variables' pointing to the project src folder.