l-portet / surebet-finder

🏈 💶 Sport surebet finder bot
63 stars 18 forks source link

Don't work #1

Closed obtim closed 4 years ago

obtim commented 4 years ago
  1. Created api.env in the root directory
  2. Placed there

    some env variables

    API_KEY=my APi key

  3. Got error

c:\temp\surebet-finder-master\index.js:2 const apiKey = require('dotenv').config().parsed.API_KEY; ^ TypeError: Cannot read property 'API_KEY' of undefined at Object. (c:\temp\surebet-finder-master\index.js:2:49) at Module._compile (internal/modules/cjs/loader.js:1138:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10) at Module.load (internal/modules/cjs/loader.js:986:32) at Function.Module._load (internal/modules/cjs/loader.js:879:14) at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js :71:12) at internal/main/run_main_module.js:17:47 npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! surebet-finder@1.0.0 start: node index.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the surebet-finder@1.0.0 start script. npm ERR! This is probably not a problem with npm. There is likely additional log ging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\1\AppData\Roaming\npm-cache_logs\2020-07-10T09_19_16_384Z -debug.log

l-portet commented 4 years ago

You must create a .env file (and notapi.env), and then write API_KEY=<you-api-key-here>.

obtim commented 4 years ago

Thanks! My mistake :(

l-portet commented 4 years ago

No problem, closing the issue. :)