Issue
I'm following Dapp Universitie's Create a PROFITABLE cryptocurrency trading bot video.
I use git and npm install but when I run npm run start in the terminal I get the following:
node index.js internal/modules/cjs/loader.js:905 throw err; ^ Error: Cannot find module 'dotenv' Require stack: - C:\Users\Kazuriah...index.js . . . at Function.Module._load (internal/modules/cjs/loader.js:790:12) at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12) { code: 'MODULE_NOT_FOUND',
Any ideas what went wrong? I'm sure you want to look at my code but I really didn't edit anything from the GitHub link he provides in the video other then the .env file https://github.com/dappuniversity/price-bot
Solution
Yeah it looks like your npm install
did not work as expected, and didn't install all the dependencies. I just tried cloning the repo you linked down, and was able to get all the dependencies.
The package.json
lists dotenv
so if it worked, it shouldn't fail.
Did you make sure to delete the package-lock.json
file before you ran your npm install
, because that may cause some issues if it is out of date.
Take a look at my screenshot and you can see how I went about installing it and was able to run the program, only failing because I don't have the API keys in my .env
file.
Answered By - treckstar Answer Checked By - David Goodson (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.