when running in locahost:3000 got this error. Tech: Nextjs Hostname: localhost
What's your code? Can you try and give some more context?
//appwrite.js file
import {Client, Account, ID, Databases, Storage} from "appwrite"; const client = new Client() .setEndpoint("https://cloud.appwrite.io/v1") .setProject(process.env.NEXT_PUBLIC_APPWRITE_PROJECT_ID!)
const account = new Account(client); const databases = new Databases(client); const storage = new Storage(client);
export {client, account, databases, storage, ID};
Btw, it's best to use 3 back ticks with multi-line code. See https://www.markdownguide.org/extended-syntax/#syntax-highlighting
Can you try logging that environment variable before passing it into set project?
I couldn't get the solution, so moved to different one! I will close this issues thanks
process.env.NEXT_PUBLIC_APPWRITE_PROJECT_ID! The exclamation mark might be the issue
it should work with the !, but it has always given me problems (idk why)
that's why I just do as string
It is necessary to use, in order to let the project know that yes, I know this will work
Yes that's true. Regardless, you said you fixed it. Mind sharing how you did that
So other people who face a similar issue can use your solution!
Actually could solve it, and had to complete the project, so used mongoDB instead
couldn't*
Recommended threads
- education plan not activated
Hi I have an edu id 13103046@iubat.edu but when I am trying to claim my plan and trying to logging with github where education student plan active. the appwrite...
- 500 simultaneous OAuth logins from the s...
Hi, I'd like to ask about rate limiting around Google OAuth login on Appwrite Cloud. **OVERVIEW** Service type: A PWA (web app) for members of a university clu...
- Suspicious access pattern detected when ...
Hello, I am having trouble restoring my project. In the past it worked with no problems, but today I get an error "Suspicious access pattern detected". How can ...