jeraldlyh / telegram-shop

Bringing e-commerce experience live to Telegram
https://t.me/teleshop_beta_bot
41 stars 20 forks source link

Starting issue "npm run start" #2

Open semaf opened 1 year ago

semaf commented 1 year ago

Hey,

Getting the error I cant fix.

pi@raspberry:~/telegram-shop/telegram $ npm run start

> telegram@1.0.0 start
> nodemon -r dotenv/config app.js

[nodemon] 2.0.20
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): *.*
[nodemon] watching extensions: js,mjs,json
[nodemon] starting `node -r dotenv/config app.js`
node:internal/validators:162
    throw new ERR_INVALID_ARG_TYPE(name, 'string', value);
    ^

TypeError [ERR_INVALID_ARG_TYPE]: The "url" argument must be of type string. Received undefined
    at new NodeError (node:internal/errors:387:5)
    at validateString (node:internal/validators:162:11)
    at Url.parse (node:url:168:3)
    at Object.urlParse [as parse] (node:url:155:13)
    at new Sequelize (/home/mi/telegram-shop/telegram/node_modules/sequelize/lib/sequelize.js:186:28)
    at Object.<anonymous> (/home/mi/telegram-shop/telegram/database/index.js:4:19)
    at Module._compile (node:internal/modules/cjs/loader:1155:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1209:10)
    at Module.load (node:internal/modules/cjs/loader:1033:32)
    at Function.Module._load (node:internal/modules/cjs/loader:868:12) {
  code: 'ERR_INVALID_ARG_TYPE'
}
[nodemon] app crashed - waiting for file changes before starting...
jeraldlyh commented 1 year ago

hello, it seems like you did not create a .env file to load the environment variable for your database