next-learn
next-learn copied to clipboard
Chapter 6: Cannot seed database
I can't seed database. Can anyone help me solve this problem? /(ㄒoㄒ)/~~
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.
Node.js v21.0.0
Have you resolved it? I am encountering the same issue as you, and I'm getting the same error on two different computers.
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
Me too. What can I do?
I have the same issue when seeding. How to solve it?
Following for the solution. I am also getting the same error.
Could you try Node.js 20 LTS instead of 21?
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
I am also facing the same issue... ☹️
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!
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
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.
try running vercel dev
https://github.com/orgs/vercel/discussions/2350#discussioncomment-5850746
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