edwinhern / express-typescript-2024

Express + TypeScript + Boilerplate for Web / API App
https://express.hernandezserver.com/
698 stars 146 forks source link

Error Run : npm run dev #196

Closed hisyam-harun closed 4 months ago

hisyam-harun commented 5 months ago

Error that i facing was :


❯ npm run dev

> express-typescript-boilerplate@1.0.11 dev
> tsx watch --clear-screen=false src/index.ts | pino-pretty

================================
 Invalid environment variables:
    COMMON_RATE_LIMIT_MAX_REQUESTS: Invalid number input: ""20" # Max number of requests per window per IP"
    COMMON_RATE_LIMIT_WINDOW_MS: Invalid number input: ""1000" # Window size for rate limiting (ms)"
    HOST: Invalid host (domain or ip): ""localhost"       # Hostname for the server"
    NODE_ENV: Value ""development" # Options: 'development', 'production'" not in choices [development,production,test]
    PORT: Invalid port input: ""8080"            # The port your server will listen on"
================================

 Exiting with error code 1
Pedromigacz commented 5 months ago

Do you have these environment variables and the project is not reading? Or are you just missing them?

edwinhern commented 5 months ago

This normally happens when the .env file isn't created in the root of the project