Closed itacasoft closed 7 months ago
Hay @itacasoft, I think you made a mistake. It's not npx db prisma deploy
it's npx prisma db deploy
Try out this:
npx prisma db deploy
If that's not working then try this, please let me know if all of them are working or not.
npx prisma db push
Apologize, I did issue the command
_npx prima db deploy_
and the result is "Unknown command". However I tried also with the push command, with no luck either:
_C:\usr\Projects\papermark>npx prisma db push Environment variables loaded from .env Prisma schema loaded from prisma\schema.prisma Datasource "db": PostgreSQL database
Error: Prisma schema validation - (get-config wasm)
Error code: P1012
error: Error validating datasource db : You must provide a nonempty direct URL. The environment variable POSTGRES_PRISMA_URL_NON_POOLING resolved to an empty string.
--> schema.prisma:4 |
3 | url = env("POSTGRES_PRISMA_URL") // uses connection pooling 4 | directUrl = env("POSTGRES_PRISMA_URL_NON_POOLING") // uses a direct connection |
---|
Validation Error Count: 1 [Context: getConfig]
Prisma CLI Version : 5.9.1_
Have you setup this env variable POSTGRES_PRISMA_URL_NON_POOLING=
if not then add this POSTGRES_PRISMA_URL_NON_POOLING=
environment variable to your .env
file. The value of this env variable is going to same as this POSTGRES_URL_NON_POOLING=
env variable.
I finally managed to overcome the database connection issue.
I suggest to add the following to the Getting Started section:
Now, when issuing the command
_npm run dev_
I encounter the following error message:
C:\usr\Projects\papermark>npm run dev
papermark@0.1.0 dev next dev
▲ Next.js 14.1.0
Experiments (use at your own risk): · missingSuspenseWithCSRBailout
⚠ Attempted to load @next/swc-win32-x64-msvc, but an error occurred: \?\C:\usr\Projects\papermark\node_modules\@next\swc-win32-x64-msvc\next-swc.win32-x64-msvc.node is not a valid Win32 application. \?\C:\usr\Projects\papermark\node_modules\@next\swc-win32-x64-msvc\next-swc.win32-x64-msvc.node ⨯ Failed to load SWC binary for win32/x64, see more info here: https://nextjs.org/docs/messages/failed-loading-swc
Please help, thx
Don't know exactly why it's happening, I guess something is wrong with your system.
Reinstalling npm packages can resolve this issue:
rm -rf node_modules
npm i
Otherwise if it's not working then share your basic operating system info so that I can assist you better.
Thank you @ashrafchowdury , I reached a page that was suggesting the same and it worked.
Now, web application starts, but when I try to register on page http://localhost:3000/login, apparently it works, but actually no email is sent. I registered on Resend with a free plan and set the RESEND_API_KEY value in the .env environment with the API Key copied from Resend web site, but I did not receive any email.
For information, I installed everything on my laptop connected to internet through my home WiFi, but I tried also hotspot of my mobile phone with no success.
Thanks in advance for any help.
Any suggestion?
You have to run the email server to get to login.
Run the email server by using:
npm run email
ok. I have run "npm run email" on a CMD prompt, and "npm run dev" on another CMD prompt. Now, trying to register give me a better understandable error:
See also the log file.
What's next? Thx
Hey @itacasoft
I apologize. There's an error in the readme.
It should be
npx prisma migrate deploy
Hope that helps
Thank you @mfts and @ashrafchowdury , but I still have problem sending emails. However, since the Prisma part is OK and the web server starts and responds, I would close the issue related to the installation and db deploy and open an issue related to email. Thanks all for your support.
Trying to install it on Windows 10, when I try to run the npx command:
it returns:
_! Unknown command "deploy"
Manage your database schema and lifecycle during development.
Usage
$ prisma db [command] [options]
Options
-h, --help Display this help message --schema Custom path to your Prisma schema
Commands pull Pull the state from the database to the Prisma schema using introspection push Push the state from Prisma schema to the database during prototyping seed Seed your database execute Execute native commands to your database_
I should add the version of npm and npx program is 10.2.4:
_C:\usr\Projects\papermark>npm -v 10.2.4
C:\usr\Projects\papermark>npx -v 10.2.4__
Any hint how to proceed? Thanks