next-learn icon indicating copy to clipboard operation
next-learn copied to clipboard

Chapter 6: Cannot seed database

Open 7-days-a-goal opened this issue 1 year ago • 13 comments

I can't seed database. Can anyone help me solve this problem? /(ㄒoㄒ)/~~

1703225851740 PS D:\projects\next\nextjs-dashboard> npm run seed

seed node -r dotenv/config ./scripts/seed.js

node:events:493 throw er; // Unhandled 'error' event ^

Error: read ECONNRESET at TLSWrap.onStreamRead (node:internal/stream_base_commons:217:20) Emitted 'error' event on WebSocket instance at: at emitErrorAndClose (D:\projects\next\nextjs-dashboard\node_modules\ws\lib\websocket.js:1016:13) at ClientRequest. (D:\projects\next\nextjs-dashboard\node_modules\ws\lib\websocket.js:864:5) at ClientRequest.emit (node:events:515:28) at TLSSocket.socketErrorListener (node:_http_client:495:9) at TLSSocket.emit (node:events:515:28) at emitErrorNT (node:internal/streams/destroy:151:8) at emitErrorCloseNT (node:internal/streams/destroy:116:3) at process.processTicksAndRejections (node:internal/process/task_queues:82:21) { errno: -4077, code: 'ECONNRESET', syscall: 'read' }

Node.js v21.0.0

7-days-a-goal avatar Dec 22 '23 06:12 7-days-a-goal

Have you resolved it? I am encountering the same issue as you, and I'm getting the same error on two different computers.

wanglin1329 avatar Dec 28 '23 14:12 wanglin1329

Have you resolved it? I am encountering the same issue as you, and I'm getting the same error on two different computers.

Not yet

7-days-a-goal avatar Dec 28 '23 15:12 7-days-a-goal

Me too. What can I do?

passion0619 avatar Jan 11 '24 17:01 passion0619

I have the same issue when seeding. How to solve it?

myat-hsu-mon avatar Jan 18 '24 12:01 myat-hsu-mon

Following for the solution. I am also getting the same error.

Mulindi123 avatar Jan 19 '24 21:01 Mulindi123

Could you try Node.js 20 LTS instead of 21?

leerob avatar Jan 21 '24 03:01 leerob

Could you try Node.js 20 LTS instead of 21?你能试试 Node.js 20 LTS 而不是 21 吗?

Even if it is changed to version 20, it still won’t work

YYGod0120 avatar Jan 22 '24 06:01 YYGod0120

I am also facing the same issue... ☹️

prakhar9015 avatar Jan 22 '24 11:01 prakhar9015

Hi! For those experiencing issues with populating the table, in particular, error -4077, a solution for me was to temporarily downgrade your node version to LTS14.

nvm install 14 nvm use 14

It worked for me. Hope it helps!

joshuayapwj98 avatar Jan 25 '24 07:01 joshuayapwj98

Hi! For those experiencing issues with populating the table, in particular, error -4077, a solution for me was to temporarily downgrade your node version to LTS14.

nvm install 14 nvm use 14

It worked for me. Hope it helps!

It works,but why can't use npm 20 or 21

YYGod0120 avatar Jan 26 '24 08:01 YYGod0120

I remember darkly that TLS defaults/support in Node versions greater 14 has changed. This is an issue of your environments. I'm not savvy with networking, but suspects are OSes, VPNs and Firewalls. If you have time and if you are patient, debug/monitor networking.

don-esteban avatar Feb 23 '24 10:02 don-esteban

try running vercel dev

vignxs avatar Mar 30 '24 09:03 vignxs

https://github.com/orgs/vercel/discussions/2350#discussioncomment-5850746

vignxs avatar Mar 30 '24 09:03 vignxs

I am not able to reproduce this. Please open a new issue if you are still having trouble here. Thank you!

We are also making the seeding easier in this PR by allowing you to hit a URL in the browser: https://github.com/vercel/next-learn/pull/764

leerob avatar Jun 23 '24 22:06 leerob