Just following allong with the Getting Started with Next.js and Xata guide and I'm getting this error:
"npm:@xata.io/client@latestModule build failed: UnhandledSchemeError: Reading from "npm:@xata.io/client@latest" is not handled by plugins (Unhandled scheme).Webpack supports "data:" and "file:" URIs by default.You may need an additional plugin to handle "npm:" URIs."
"npm:@xata.io/client@latestModule build failed: UnhandledSchemeError: Reading from "npm:@xata.io/client@latest" is not handled by plugins (Unhandled scheme).Webpack supports "data:" and "file:" URIs by default.You may need an additional plugin to handle "npm:" URIs."
on the step where I'm replacing the content in the home page here:
"Next, import the auto-generated getXataClient function from src/xata.ts, get all the posts using the client, and list them within the page:src/app/page.tsximport { getXataClient } from '@/xata';const xata = getXataClient();export default async function Home() { const posts = await xata.db.Posts.getAll(); return ( <> <div className="w-full max-w-5xl mt-16"> {posts.length === 0 && <p>No blog posts found</p>} {posts.map((post) => ("
"Next, import the auto-generated getXataClient function from src/xata.ts, get all the posts using the client, and list them within the page:src/app/page.tsximport { getXataClient } from '@/xata';const xata = getXataClient();export default async function Home() { const posts = await xata.db.Posts.getAll(); return ( <> <div className="w-full max-w-5xl mt-16"> {posts.length === 0 && <p>No blog posts found</p>} {posts.map((post) => ("
I'm getting a TS error saying: "Property 'db' does not exist on type 'XataClient'.ts(2339)" and also in my xata.ts file autogenerated, I'm getting the errors: "Cannot find module or its corresponding type declarations." and Cannot find module 'npm:@xata.io/client@latest' or its corresponding type declarations. "
Recent Announcements
Continue the conversation
Join the Discord to ask follow-up questions and connect with the community
X
Xata
This is Xata's community Discord server, where we discuss all things Xata: projects, features, dreams!