最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Showing error invalid url in terminal while connecting database through appwrite - Stack Overflow

programmeradmin3浏览0评论
Error TypeError: Invalid URL
    at new URL (node:internal/url:796:36)
    at Account.create (webpack-internal:///(action-browser)/./node_modules/node-appwrite/dist/services/account.mjs:71:17)
    at $$ACTION_1 (webpack-internal:///(action-browser)/./lib/actions/user.actions.ts:36:46)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  code: 'ERR_INVALID_URL',
  input: 'undefined/account'
}

This error is showing in my terminal and I am unable to fix it

I am trying to connect to the database using appwrite on my next.js application

Error TypeError: Invalid URL
    at new URL (node:internal/url:796:36)
    at Account.create (webpack-internal:///(action-browser)/./node_modules/node-appwrite/dist/services/account.mjs:71:17)
    at $$ACTION_1 (webpack-internal:///(action-browser)/./lib/actions/user.actions.ts:36:46)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  code: 'ERR_INVALID_URL',
  input: 'undefined/account'
}

This error is showing in my terminal and I am unable to fix it

I am trying to connect to the database using appwrite on my next.js application

Share Improve this question edited Feb 17 at 16:40 Mureinik 312k54 gold badges353 silver badges389 bronze badges asked Feb 17 at 15:51 Rishabh RajRishabh Raj 1 New contributor Rishabh Raj is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct. 2
  • 1 To help you with this error, please provide the relevant code as a text-based minimal reproducible example, where you're using Appwrite to connect to the database (especially the code around Account.create and the URL you're using). – evolutionxbox Commented Feb 17 at 15:53
  • Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it's hard to tell exactly what you're asking. – Community Bot Commented Feb 17 at 21:30
Add a comment  | 

1 Answer 1

Reset to default 1

It looks like your Appwrite endpoint or project ID is either missing or incorrectly configured, which is causing an invalid URL (undefined/account).

Check Your Environment Variables Make sure your .env.local file has the correct Appwrite credentials:

NEXT_PUBLIC_APPWRITE_ENDPOINT=https://cloud.appwrite.io/v1
NEXT_PUBLIC_APPWRITE_PROJECT=your_project_id
NEXT_PUBLIC_APPWRITE_DATABASE_ID=your_database_id
NEXT_PUBLIC_APPWRITE_COLLECTION_ID=your_collection_id

please share the code you write without your credentials so we can help you if it still exists

发布评论

评论列表(0)

  1. 暂无评论