Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

187
Views
Why does the "dist" folder have a "localhost:3000" code?

http://localhost:8080 -> error

PS C:\Users\shine\Desktop\Dev\node\project> npm run start

> with-typescript@1.0.0 start
> cross-env NODE_ENV=production node dist/server/index.js

info  - Loaded env from C:\Users\shine\Desktop\Dev\node\project\.env.production.local
info  - Loaded env from C:\Users\shine\Desktop\Dev\node\project\.env.production
info  - Loaded env from C:\Users\shine\Desktop\Dev\node\project\.env
info  - Using webpack 4. Reason: future.webpack5 option disabled https://nextjs.org/docs/messages/webpack5
Create MYSQL Connection....
ormconfig profile:  production
ormconfig profile is production:  true
ormconfig connection is localhost:  false
Load Entity Paths C:\Users\shine\Desktop\Dev\node\project\dist\server\entity\*.entity.js
Create MYSQL Connection....SUCCESS
process.env.PORT 8080
Server Running at :8080
ormconfig profile:  production
ormconfig profile is production:  true
ormconfig connection is localhost:  false
Load Entity Paths \\dist\server\entity\*.entity.js
[next-auth][error][client_fetch_error] 
https://next-auth.js.org/errors#client_fetch_error session FetchError: request to http://localhost:3000/api/auth/session failed, reason: connect ECONNREFUSED 127.0.0.1:3000
    at ClientRequest.<anonymous> (C:\Users\shine\Desktop\Dev\node\project\node_modules\next\node_modules\node-fetch\lib\index.js:1461:11)
    at ClientRequest.emit (node:events:390:28)
    at Socket.socketErrorListener (node:_http_client:447:9)
    at Socket.emit (node:events:390:28)
    at emitErrorNT (node:internal/streams/destroy:157:8)
    at emitErrorCloseNT (node:internal/streams/destroy:122:3)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  type: 'system',
  errno: 'ECONNREFUSED',
  code: 'ECONNREFUSED'
}

npm run build -> Why does the "dist" folder have a "localhost:3000" code?

package.json

"dev": "nodemon",
"build": "next build && tsc --project tsconfig.server.json",
"start": "cross-env NODE_ENV=production node dist/server/index.js",

.evn.production

PORT=8080
NEXT_PUBLIC_BASE_URL="http://localhost:8080"
NEXTAUTH_URL_INTERNAL=${NEXT_PUBLIC_BASE_URL}
NEXTAUTH_URL=${NEXT_PUBLIC_BASE_URL}
VERCEL_URL=${NEXT_PUBLIC_BASE_URL}

When the commands "npm run dev" and "npm run start" are executed together, it operates normally.

help me plz...

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!