Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chapter 6: after running seeding script I got console logs that my database had been seeded, but I don't have any data #676

Open
Om-Oleksandr opened this issue May 13, 2024 · 4 comments

Comments

@Om-Oleksandr
Copy link

image
image

@Om-Oleksandr
Copy link
Author

can this error cause the issue?
image

@nirajanach
Copy link

I had a similar problem, I seeded again after stopping server and it seeded after that.

the steps:
1.) stop the server from terminal: Ctrl + x
2.) run the seeding command: npm run seed
3.) check Postgres Data tab.

@sAndrin3
Copy link

I had this issue

npm run seed

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

/home/node/Documents/NextJs/nextjs-dashboard/node_modules/@neondatabase/serverless/index.js:364
a(ko,"BufferBigIntNotDefined")});var b,S,v,w,d,y,p=K(()=>{"use strict";b=globalThis,S=globalThis.setImmediate??(r=>setTimeout(
^

SyntaxError: Unexpected token '?'
at wrapSafe (internal/modules/cjs/loader.js:915:16)
at Module._compile (internal/modules/cjs/loader.js:963:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Module.require (internal/modules/cjs/loader.js:887:19)
at require (internal/modules/cjs/helpers.js:74:18)
at Object. (/home/node/Documents/NextJs/nextjs-dashboard/node_modules/@vercel/postgres/dist/chunk-PKSWROYW.cjs:2:19)
at Module._compile (internal/modules/cjs/loader.js:999:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)

**The solution was Upgrading node: nvm install node**

**Result**
npm run seed

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

Created "users" table
Seeded 1 users
Created "customers" table
Seeded 10 customers
Created "invoices" table
Seeded 15 invoices
Created "revenue" table
Seeded 12 revenue

@GaneshSrambikal
Copy link

I had a similar problem, I seeded again after stopping server and it seeded after that.

the steps: 1.) stop the server from terminal: Ctrl + x 2.) run the seeding command: npm run seed 3.) check Postgres Data tab.

As you have found the solution, this issue can be closed.

Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants