joschan21 / quill Goto Github PK
View Code? Open in Web Editor NEWQuill - A Modern SaaS-Platform Built With Next.js 13
Quill - A Modern SaaS-Platform Built With Next.js 13
Hello guys. I have a few issues: I tried to sign in but got this message: This page isn’t working localhost is currently unable to handle this request.
HTTP ERROR 500
In the terminal I get: TypeError: Invalid URL code: 'ERR_INVALID_URL input: '/oauth2/auth
Your help is appreciated.
route.ts:
import {handleAuth} from "@kinde-oss/kinde-auth-nextjs/server";
import { NextRequest } from "next/server";
export async function GET(request: NextRequest, {params}: any) {
const endpoint = params.kindeAuth;
return handleAuth(request, endpoint);
}
.env:
ID=4901adb23e5043ecbb43b6dd4f6e012f
KINDE_CLIENT_SECRET=5CVuqFl9mCg2LUgmVxwuvJnYK3j65mZ2eg3czt57NXQJykK7QC
KINDE_ISSUER_URL=https://doklaw2.kinde.com
KINDE_SITE_URL=http://localhost:3000
KINDE_POST_LOGOUT_REDIRECT_URL=http://localhost:3000
KINDE_POST_LOGIN_REDIRECT_URL=http://localhost:3000/dashboard
2nd ISSUE: the "Get started" buttons are blue, I don't know why. Also the
Chat with your documents in seconds.
DokLaw allows you to have conversations with your PDF document. Simply upload your file and start asking questions right away.
Get started is not centered. Again any help would be appreciated.
import MaxWidthWrapper from "@/components/MaxWidthWrapper";
import Link from "next/link";
import { ArrowRight } from "lucide-react";
import { buttonVariants } from "@/components/ui/button";
import Image from 'next/image'
export default function Home() {
return (
<>
DokLaw is live!
DokLaw allows you to have conversations with your PDF document. Simply upload your file and start asking questions right away.
<Link className={buttonVariants({
size: 'lg',
className: "mt-5",
})} href='/dashboard'
target='_blank'>
Get started {''}
<ArrowRight className="ml-2 h-5 w-5" />
</Link>
</MaxWidthWrapper>
<div>
<div className='relative isolate'>
<div
aria-hidden='true'
className='pointer-events-none absolute inset-x-0 -top-40 -z-10 transform-gpu overflow-hidden blur-3xl sm:-top-80'>
<div
style={{
clipPath:
'polygon(74.1% 44.1%, 100% 61.6%, 97.5% 26.9%, 85.5% 0.1%, 80.7% 2%, 72.5% 32.5%, 60.2% 62.4%, 52.4% 68.1%, 47.5% 58.3%, 45.2% 34.5%, 27.5% 76.7%, 0.1% 64.9%, 17.9% 100%, 27.6% 76.8%, 76.1% 97.7%, 74.1% 44.1%)',
}}
className='relative left-[calc(50%-11rem)] aspect-[1155/678] w-[36.125rem] -translate-x-1/2 rotate-[30deg] bg-gradient-to-tr from-[#ff80b5] to-[#9089fc] opacity-30 sm:left-[calc(50%-30rem)] sm:w-[72.1875rem]'
/>
</div>
<div>
<div className='mx-auto max-w-6xl px-6 lg:px-8'>
<div className='mt-16 flow-root sm:mt-24'>
<div className='-m-2 rounded-xl bg-gray-900/5 p-2 ring-1 ring-inset ring-gray-900/10 lg:-m-4 lg:rounded-2xl lg:p-4'>
<Image
src='/dashboard-preview.jpg'
alt='product preview'
width={1364}
height={866}
quality={100}
className='rounded-md bg-white p-2 sm:p-8 md:p-20 shadow-2xl ring-1 ring-gray-900/10'
/>
</div>
</div>
</div>
</div>
<div
aria-hidden='true'
className='pointer-events-none absolute inset-x-0 -top-40 -z-10 transform-gpu overflow-hidden blur-3xl sm:-top-80'>
<div
style={{
clipPath:
'polygon(74.1% 44.1%, 100% 61.6%, 97.5% 26.9%, 85.5% 0.1%, 80.7% 2%, 72.5% 32.5%, 60.2% 62.4%, 52.4% 68.1%, 47.5% 58.3%, 45.2% 34.5%, 27.5% 76.7%, 0.1% 64.9%, 17.9% 100%, 27.6% 76.8%, 76.1% 97.7%, 74.1% 44.1%)',
}}
className='relative left-[calc(50%-13rem)] aspect-[1155/678] w-[36.125rem] -translate-x-1/2 rotate-[30deg] bg-gradient-to-tr from-[#ff80b5] to-[#9089fc] opacity-30 sm:left-[calc(50%-36rem)] sm:w-[72.1875rem]'
/>
</div>
</div>
</div>
{/* Feature section */}
<div className='mx-auto mb-32 mt-32 max-w-5xl sm:mt-56'>
<div className='mb-12 px-6 lg:px-8'>
<div className='mx-auto max-w-2xl sm:text-center'>
<h2 className='mt-2 font-bold text-4xl text-gray-900 sm:text-5xl'>
Start chatting in minutes
</h2>
<p className='mt-4 text-lg text-gray-600'>
Chatting to your PDF files has never been
easier than with DokLaw.
</p>
</div>
</div>
{/* steps */}
<ol className='my-8 space-y-4 pt-8 md:flex md:space-x-12 md:space-y-0'>
<li className='md:flex-1'>
<div className='flex flex-col space-y-2 border-l-4 border-zinc-300 py-2 pl-4 md:border-l-0 md:border-t-2 md:pb-0 md:pl-0 md:pt-4'>
<span className='text-sm font-medium text-blue-600'>
Step 1
</span>
<span className='text-xl font-semibold'>
Sign up for an account
</span>
<span className='mt-2 text-zinc-700'>
Either starting out with a free plan or
choose our{' '}
<Link
href='/pricing'
className='text-blue-700 underline underline-offset-2'>
pro plan
</Link>
.
</span>
</div>
</li>
<li className='md:flex-1'>
<div className='flex flex-col space-y-2 border-l-4 border-zinc-300 py-2 pl-4 md:border-l-0 md:border-t-2 md:pb-0 md:pl-0 md:pt-4'>
<span className='text-sm font-medium text-blue-600'>
Step 2
</span>
<span className='text-xl font-semibold'>
Upload your PDF file
</span>
<span className='mt-2 text-zinc-700'>
We'll process your file and make it
ready for you to chat with.
</span>
</div>
</li>
<li className='md:flex-1'>
<div className='flex flex-col space-y-2 border-l-4 border-zinc-300 py-2 pl-4 md:border-l-0 md:border-t-2 md:pb-0 md:pl-0 md:pt-4'>
<span className='text-sm font-medium text-blue-600'>
Step 3
</span>
<span className='text-xl font-semibold'>
Start asking questions
</span>
<span className='mt-2 text-zinc-700'>
It's that simple. Try out DokLaw today -
it really takes less than a minute.
</span>
</div>
</li>
</ol>
<div className='mx-auto max-w-6xl px-6 lg:px-8'>
<div className='mt-16 flow-root sm:mt-24'>
<div className='-m-2 rounded-xl bg-gray-900/5 p-2 ring-1 ring-inset ring-gray-900/10 lg:-m-4 lg:rounded-2xl lg:p-4'>
<Image
src='/file-upload-preview.jpg'
alt='uploading preview'
width={1419}
height={732}
quality={100}
className='rounded-md bg-white p-2 sm:p-8 md:p-20 shadow-2xl ring-1 ring-gray-900/10'
/>
</div>
</div>
</div>
</div>
</>
)
}
When hosting it, the file upload does not work
I got this error codes while trying to deploy.
09:39:21.041 |
09:39:21.041 | info - Need to disable some ESLint rules? Learn more here: https://nextjs.org/docs/basic-features/eslint#disabling-rules
09:39:26.750 | Failed to compile.
09:39:26.750 |
09:39:26.750 | ./src/components/ui/dialog.tsx:14:3
09:39:26.750 | Type error: Property 'className' does not exist on type 'DialogPortalProps'.
09:39:26.750 |
09:39:26.751 | 12 |
09:39:26.751 | 13 | const DialogPortal = ({
09:39:26.751 | > 14 | className,
09:39:26.751 | | ^
09:39:26.751 | 15 | ...props
09:39:26.751 | 16 | }: DialogPrimitive.DialogPortalProps) => (
09:39:26.751 | 17 | <DialogPrimitive.Portal className={cn(className)} {...props} />
09:39:26.913 | Error: Command "npm run build" exited with 1
Not sure why, but the KindeUser is returning empty.
Here is from dashboard/tsx:
import { getKindeServerSession } from '@kinde-oss/kinde-auth-nextjs/server';
import { redirect } from "next/navigation";
const Page = () => {
const {getUser} = getKindeServerSession()
const user = getUser()
return (
<div>
{user.id}
</div>
)
}
export default Page;
Here is my api/auth/[kindeAuth]/route.ts:
import {handleAuth} from "@kinde-oss/kinde-auth-nextjs/server";
import { NextRequest } from "next/server";
export async function GET(request: NextRequest,
{params}: any
) {
const endpoint = params.kindeAuth;
return handleAuth(request, endpoint);
}
Here is my .env:
KINDE_CLIENT_ID=cddf6cbfa9f24a98bea653b2bff880f1
KINDE_CLIENT_SECRET=KtpefogOVoQJXEd2WFwxOhvahxA5G6SJc20GZNZZzvUbYmdbvK
KINDE_ISSUER_URL=https://inquireai1.kinde.com
KINDE_SITE_URL=http://localhost:3000
KINDE_POST_LOGOUT_REDIRECT_URL=http://localhost:3000
KINDE_POST_LOGIN_REDIRECT_URL=http://localhost:3000/dashboard
What could be the problem? I cannot use user.id because it is turning up empty. However, there is a user registered in Kinde
Hi everyone, very frustrated that I can't get this to work. Anytime I log in to the Kinde Auth on the deployed version I get this error:
. I am not redirected to my dashboard but to the home page.
Failed to load resource: the server responded with a status of 404 ()
Some things I've tried and helpful information:
There is a related issue on this Github thread (at the very end): #17
but the issue was never closed. Has anyone had the same issue and found a solution? Thanks.
Hello folks,
After the update of pinecone has anyone face issue of Error [InsufficientQuotaError]: You exceeded your current quota, please check your plan and billing details. at Object.defaultFailedAttemptHandler [as onFailedAttempt] (webpack-internal:///(rsc)/./node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/langchain/dist/util/async_caller.js:37:21) at RetryOperation.eval [as _fn] (webpack-internal:///(rsc)/./node_modules/.pnpm/[email protected]/node_modules/p-retry/index.js:55:39)
I had seen a lot of deployed app are also throwing error on uploading pdf.
Examle: https://pdfninja.vercel.app/
This app is also showing FAILED comp on ChatWrapper. @joschan21 @biplobsd
We would love to have also a field to import link and converting it to pdf and send it to plannetscale database
is that possible ?
First Problem: How to fix broken image?
Second problem: When I click to upload a document it makes 2 file explorer open on top of each other and would have to move one to see the other one behind it, How can I fix this so only 1 pops up when clicking upload document?
ALSO, when I upload a 1 page document I get "Too many pages" and it thinks I've uploaded max pages. So need a fix for that too
By following the video, I have successfully deployed the "inital commit" version of the app, then Josh has made some changes inside the code and I have followed, but as you can see while deploying the"stripe stuff" version, I get the error " Build failed because of webpack errors", I leave the screenshot that I get in VSCode. I have checked the spelling errors and all other possible mistakes that I could have made.
My PDF is not rendering. Anyone know how to solve this issue?
Here is my repository:
https://github.com/ck18sss/InquireAI_v2
I am getting an issue where it stays on this screen for at least 20 seconds until eventually working, it is extremely slow and keeps retrying: I am at around 4:40:53 in the video.
I am getting this error in the console:
Here is my github repository code:
https://github.com/ck18sss/InquireAI_v2
how fix this erro on dialog.tsx : Type '{ children?: ReactNode; container?: HTMLElement | null | undefined; forceMount?: true | undefined; className: string; }' is not assignable to type 'IntrinsicAttributes & DialogPortalProps'.
Property 'className' does not exist on type 'IntrinsicAttributes & DialogPortalProps'.
const DialogPortal = ({ className, ...props }: DialogPrimitive.DialogPortalProps) => ( <DialogPrimitive.Portal className ={cn(className)}{...props} /> )
To avoid error below, does it mean we need to connect to GPT 4 instead of GPT 3.5 for some messages that require AI to do more difficult task : error: message: "This model's maximum context length is 4097 tokens. However, your messages resulted in 4589 tokens. Please reduce the length of the messages."
What do I put for STRIPE_WEBHOOK_SECRET=
in the .env file?
What should the hook be listening for?
path: https://github.com/joschan21/quill/blob/master/src/app/api/uploadthing/core.ts
file: core.ts
there is a potential flaw in the approach where the upload status is updated to "SUCCESS" without considering any condition. This means that regardless of whether the upload exceeded the allowed limit or not, the upload status will always be set to "SUCCESS" at the end of the function.
To address this flaw, it would be better to update the upload status to "SUCCESS" only if the upload did not exceed the allowed limit. Currently, the code only updates the upload status to "FAILED" if the limit is exceeded, but it does not provide a corresponding update to set the status to "SUCCESS" if the limit is not exceeded. This inconsistency could lead to incorrect status reporting in the database.
You can add an additional check before the last db.file.update() call to update the upload status to "SUCCESS" only when the limit is not exceeded. This can be done by negating the condition used to update the status to "FAILED". For example:
if (!(isSubscribed && isProExceeded) && !(isFreeExceeded)) { await db.file.update({ data: { uploadStatus: 'SUCCESS', }, where: { id: createdFile.id, }, }); }
I have been trying to authenticate the saas . I keep getting Invalid callback URL on kindle after following the instructions
I encountered the problem of "ERR_PNPM_OUTDATED_LOCKFILE Cannot install with "frozen-lockfile" because pnpm-lock.yaml is not up to date with package.json"
I checked everything, but it still keeps showing "Too many pages in PDF"
I also cloned it and put my .env file but still same issues.
Also tried all the possible solutions in #2 but it's stiil the same error.
Any fix @joschan21 ?
Is it because pinecone got updated ?
I am getting an error in kindeAuth/route.ts when I deploy to Vercel.
It works fine in the local environment. Here is my repository: https://github.com/ck18sss/InquireAI_v2
This is the code in kindeAuth:
import { handleAuth } from '@kinde-oss/kinde-auth-nextjs/server'
import { NextRequest } from 'next/server'
export async function GET(
request: NextRequest,
{ params }: any
) {
const endpoint = params.kindeAuth
return handleAuth(request, endpoint)
}
While testing Pinecone within api/uploadthing/core.ts
i get the error:
TypeError: this.pineconeIndex.namespace is not a function
at PineconeStore.addVectors (webpack-internal:///(rsc)/./node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/langchain/dist/vectorstores/pinecone.js:113:46)
at PineconeStore.addDocuments (webpack-internal:///(rsc)/./node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/langchain/dist/vectorstores/pinecone.js:69:21)
core.ts :
import { db } from "@/db";
import { getKindeServerSession } from "@kinde-oss/kinde-auth-nextjs/server";
import { createUploadthing, type FileRouter } from "uploadthing/next";
import { PDFLoader } from "langchain/document_loaders/fs/pdf";
import { OpenAIEmbeddings } from "langchain/embeddings/openai";
import { PineconeStore } from "langchain/vectorstores/pinecone";
import { getPineconeClient } from "@/lib/pinecone";
const f = createUploadthing();
const middleware = async () => {
const { getUser } = getKindeServerSession();
const user = getUser();
if (!user || !user.id) throw new Error("Unauthorized");
return { userId: user.id };
};
const onUploadComplete = async ({
metadata,
file,
}: {
metadata: Awaited<ReturnType<typeof middleware>>;
file: {
key: string;
name: string;
url: string;
};
}) => {
const isFileExist = await db.file.findFirst({
where: {
key: file.key,
},
});
if (isFileExist) return;
const createdFile = await db.file.create({
data: {
key: file.key,
name: file.name,
userId: metadata.userId,
url: `https://uploadthing-prod.s3.us-west-2.amazonaws.com/${file.key}`,
uploadStatus: "PROCESSING",
},
});
try {
const response = await fetch(
`https://uploadthing-prod.s3.us-west-2.amazonaws.com/${file.key}`
);
const blob = await response.blob();
const loader = new PDFLoader(blob);
const pageLevelDocs = await loader.load();
const pagesAmt = pageLevelDocs.length;
// vectorize and index entire document
const pinecone = await getPineconeClient();
const pineconeIndex = pinecone.Index("chatty-pdf");
const embeddings = new OpenAIEmbeddings({
openAIApiKey: process.env.OPENAI_API_KEY,
});
await PineconeStore.fromDocuments(pageLevelDocs, embeddings, {
// @ts-ignore
pineconeIndex,
namespace: createdFile.id,
});
await db.file.update({
data: {
uploadStatus: "SUCCESS",
},
where: {
id: createdFile.id,
},
});
} catch (error) {
console.log("Processing Err: ", error);
await db.file.update({
data: {
uploadStatus: "FAILED",
},
where: {
id: createdFile.id,
},
});
}
};
export const ourFileRouter = {
pdfUploader: f({ pdf: { maxFileSize: "4MB" } })
.middleware(middleware)
.onUploadComplete(onUploadComplete),
} satisfies FileRouter;
export type OurFileRouter = typeof ourFileRouter;
I can verify that the content of lib/pinecone.ts
is correct (apikey and environment).
How can i resolve this and continue learning?
14:37:49.536 | Type error: Type 'VectorOperationsApi' is missing the following properties from type 'Index': config, target, deleteAll, _deleteAll, and 10 more.
14:37:49.536 |
14:37:49.536 | 55 |
14:37:49.536 | 56 | const vectorStore = await PineconeStore.fromExistingIndex(embeddings, {
14:37:49.536 | > 57 | pineconeIndex,
14:37:49.536 | | ^
14:37:49.536 | 58 | namespace: file.id,
14:37:49.537 | 59 | });
14:37:49.537 | 60 |
14:37:49.682 | ELIFECYCLE Command failed with exit code 1.
14:37:49.703 | Error: Command "pnpm run build" exited with 1
I was following along Josh's tutorial video when I noticed that when I tried to open the dashboard page when not authenticated, it redirected to a page that does not exist ("/sign-in") in the onError function. I edited the url to /api/auth/login and the redirect works fine, but somehow Kinde gives an error everytime I try to log in through redirection. When I try logging in via the front end ( LoginLink Component ) or if I typed the url in the browser, it works just fine.
onError: (err) => {
if(err.data?.code === "UNAUTHORIZED") {
router.push("/api/auth/login")
}
// router.push("/sign-in")
},
Is there anything I missed? could it be a problem in the Kinde side or the browser? Thanks
As per the Pinecone docs:
Projects in the gcp-starter environment do not currently support namespaces.
If one uses the Index without namespaces, there is a high probability of data leaks between different users' PDFs.
A workaround is using other Vector DBs to create a separate vector store for each PDF file.
width from useResizeDetector() sometimes is undefined and thus component from react-pdf fails to render most of the time. I copy pasted the PdfRenderer.tsx from the repo and the same problem still exists.
//PdfRenderer.tsx
"use client";
import {
ChevronDown,
ChevronUp,
Loader2,
RotateCw,
Search,
} from "lucide-react";
import { Document, Page, pdfjs } from "react-pdf";
import "react-pdf/dist/Page/AnnotationLayer.css";
import "react-pdf/dist/Page/TextLayer.css";
import { useToast } from "./ui/use-toast";
import { useResizeDetector } from "react-resize-detector";
import { Button } from "./ui/button";
import { Input } from "./ui/input";
import { useState } from "react";
import { useForm } from "react-hook-form";
import { z } from "zod";
import { zodResolver } from "@hookform/resolvers/zod";
import { cn } from "@/lib/utils";
import {
DropdownMenu,
DropdownMenuContent,
DropdownMenuItem,
DropdownMenuTrigger,
} from "./ui/dropdown-menu";
import SimpleBar from "simplebar-react";
import PdfFullscreen from "./PdfFullscreen";
pdfjs.GlobalWorkerOptions.workerSrc = //cdnjs.cloudflare.com/ajax/libs/pdf.js/${pdfjs.version}/pdf.worker.js
;
interface PdfRendererProps {
url: string;
}
const PdfRenderer = ({ url }: PdfRendererProps) => {
const { toast } = useToast();
const [numPages, setNumPages] = useState();
const [currPage, setCurrPage] = useState(1);
const [scale, setScale] = useState(1);
const [rotation, setRotation] = useState(0);
const [renderedScale, setRenderedScale] = useState<number | null>(null);
const isLoading = renderedScale !== scale;
const CustomPageValidator = z.object({
page: z
.string()
.refine((num) => Number(num) > 0 && Number(num) <= numPages!),
});
type TCustomPageValidator = z.infer;
const {
register,
handleSubmit,
formState: { errors },
setValue,
} = useForm({
defaultValues: {
page: "1",
},
resolver: zodResolver(CustomPageValidator),
});
const { width, ref } = useResizeDetector();
console.log(width);
const handlePageSubmit = ({ page }: TCustomPageValidator) => {
setCurrPage(Number(page));
setValue("page", String(page));
};
return (
<div className="flex items-center gap-1.5">
<Input
{...register("page")}
className={cn(
"w-12 h-8",
errors.page && "focus-visible:ring-red-500"
)}
onKeyDown={(e) => {
if (e.key === "Enter") {
handleSubmit(handlePageSubmit)();
}
}}
/>
<p className="text-zinc-700 text-sm space-x-1">
<span>/</span>
<span>{numPages ?? "x"}</span>
</p>
</div>
<Button
disabled={numPages === undefined || currPage === numPages}
onClick={() => {
setCurrPage((prev) =>
prev + 1 > numPages! ? numPages! : prev + 1
);
setValue("page", String(currPage + 1));
}}
variant="ghost"
aria-label="next page"
>
<ChevronUp className="h-4 w-4" />
</Button>
</div>
<div className="space-x-2">
<DropdownMenu>
<DropdownMenuTrigger asChild>
<Button className="gap-1.5" aria-label="zoom" variant="ghost">
<Search className="h-4 w-4" />
{scale * 100}%
<ChevronDown className="h-3 w-3 opacity-50" />
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent>
<DropdownMenuItem onSelect={() => setScale(1)}>
100%
</DropdownMenuItem>
<DropdownMenuItem onSelect={() => setScale(1.5)}>
150%
</DropdownMenuItem>
<DropdownMenuItem onSelect={() => setScale(2)}>
200%
</DropdownMenuItem>
<DropdownMenuItem onSelect={() => setScale(2.5)}>
250%
</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
<Button
onClick={() => setRotation((prev) => prev + 90)}
variant="ghost"
aria-label="rotate 90 degrees"
>
<RotateCw className="h-4 w-4" />
</Button>
<PdfFullscreen fileUrl={url} />
</div>
</div>
<div className="flex-1 w-full max-h-screen">
<SimpleBar autoHide={false} className="max-h-[calc(100vh-10rem)]">
<div ref={ref}>
<Document
loading={
<div className="flex justify-center">
<Loader2 className="my-24 h-6 w-6 animate-spin" />
</div>
}
onLoadError={() => {
toast({
title: "Error loading PDF",
description: "Please try again later",
variant: "destructive",
});
}}
onLoadSuccess={({ numPages }) => setNumPages(numPages)}
file={url}
className="max-h-full"
>
{isLoading && renderedScale ? (
<Page
width={width ? width : 1}
pageNumber={currPage}
scale={scale}
rotate={rotation}
key={"@" + renderedScale}
/>
) : null}
<Page
className={cn(isLoading ? "hidden" : "")}
width={width ? width : 1}
pageNumber={currPage}
scale={scale}
rotate={rotation}
key={"@" + scale}
loading={
<div className="flex justify-center">
<Loader2 className="my-24 h-6 w-6 animate-spin" />
</div>
}
onRenderSuccess={() => setRenderedScale(scale)}
/>
</Document>
</div>
</SimpleBar>
</div>
</div>
);
};
export default PdfRenderer;
stripe_customer_id, stripe_subscription_id, stripe_price_id, stripe_current_period_end do not get updated in the planetscale mysql database once stripe payment is done in test mode
I guess they recently updated the starter plan so we can't use namespace anymore, any alternative?
PineconeBadRequestError: The requested feature 'Namespaces' is not supported by the current index type 'Starter'. at mapHttpStatusError (webpack-internal:///(rsc)/./node_modules/@pinecone-database/pinecone/dist/errors/http.js:179:20) at eval (webpack-internal:///(rsc)/./node_modules/@pinecone-database/pinecone/dist/errors/handling.js:170:55) at step (webpack-internal:///(rsc)/./node_modules/@pinecone-database/pinecone/dist/errors/handling.js:107:23) at Object.eval [as next] (webpack-internal:///(rsc)/./node_modules/@pinecone-database/pinecone/dist/errors/handling.js:48:20) at fulfilled (webpack-internal:///(rsc)/./node_modules/@pinecone-database/pinecone/dist/errors/handling.js:11:32) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) { cause: undefined }
when i tries to login or sign up i am stuck on the page saying 'setting up your account' and it is giving this error
GET http://localhost:3000/api/trpc/authCallback?batch=1&input=%7B%7D 500 (Internal Server Error)
any help would be appreciated.
Thanks
At the start of your video, you modified the tailwind.config.ts and added:
maxWidth: { "8xl": "1408px", },
But later you installed a shadcn component via the cli.
What shadcn does when doing init, is replacing the whole theme config object, same for the globals.css.
Thats also why the blue color was gone that we pasted at the beginning (before doing the init) into our css and had to re-do it later in the video again.
So the max-w we are using the /dashboard/[fileid] is not doing anything.
Get this error whenever i try to upload pdf!
File gets uploaded locally but when trying on deployed version it gets stuck on redirecting
on the network tab i see - i have deployed it on railway.app
[
{
"error": {
"message": "NOT_FOUND",
"code": -32004,
"data": {
"code": "NOT_FOUND",
"httpStatus": 404,
"path": "getFile"
}
}
}
]
How do I fix this error?
Manice18/chatdocu#1 (comment)
Hi, if i want to create a FileCard component to remove the code from the .map() function in the Dashboard to create a separate component, how I can set the PageProps to automatically get the type of "file" passed as props?
I want to add the LICENSE file to the repository which is not there now.
I just uploaded one pdf file with one page. Can you please help me. Thanks a lot!
Is it possible to upgrade Kinde Auth to V2? I've tried to do it myself but I've been having problems with /dashboard not loading which I can't seem to pinpoint the reason for.
Hello there! Sign in, Get started, Pricing don't appear in the Navbar even though everything is correct in the code. Can anybody help? Thanks a lot.
Anyone had this error before ? i got this error when i try to type a message to the bot
⨯ [PineconeError: PineconeClient: Error calling query: PineconeError: PineconeClient: Error calling queryRaw: FetchError: The request failed and the interceptors did not return an alternative response]
Hi, I tried running it on my localhost and encountered an error after uploading a PDF:
POST http://localhost:3000/api/trpc/getFile?batch=1 404 (Not Found) httpUtils-0cb58db4.mjs:104
Noticed that it does not work with pdf docs which are scanned. Anyone encoutered this issue?
After selecting a file, the upload process should start, but it isn't working.
The app works fine in local production build, but not in vercel. When you ask a question getFileMessages request interrupts the message stream response resulting in no output
I have deployed my app here https://down-one.vercel.app
I'm using Github codespace and deployment on vercel .. I am changing some stuff on the homepage but it doesn't change when commiting or redeploying? why? and how to fix?
encountered an issue where, after running npx prisma studio, the Prisma Studio table shows no users, at this step for reference
I dont understand why
Why home page and /_not-found pages are also SSR?
Did anyone encounter this error?
Error: Hydration failed because the initial UI does not match what was rendered on the server.
Warning: Expected server HTML to contain a matching <textarea> in <div>.
See more info here: https://nextjs.org/docs/messages/react-hydration-error
When rendering, another <Textarea/>
component seems to be rendered outside the main div
. It happens only when I pass autoFocus
into the <Textarea/>
This is my ChatInput.tsx
import { Send } from "lucide-react";
import { Button } from "../ui/button";
import { Textarea } from "../ui/textarea";
interface ChatInputProps {
isDisabled?: boolean;
}
const ChatInput = ({ isDisabled }: ChatInputProps) => {
return (
<div className="absolute bottom-0 left-0 w-full">
<form className="mx-2 flex flex-row gap-3 md:mx-4 md:last:mb-6 lg:mx-auto lg:max-w-2xl xl:max-w-3xl">
<div className="relative flex h-full flex-1 items-stretch md:flex-col">
<div className="relative flex w-full flex-grow flex-col p-4">
<div className="relative">
<Textarea
rows={1}
autoFocus
maxRows={4}
placeholder="Enter your question..."
className="scrollbar-thumb-blue scrollbar-thumb-rounded scrollbar-track-blue-lighter scrollbar-w-2 scrolling-touch resize-none py-3 pr-12 text-base"
/>
<Button aria-label="send">
<Send className="h-4 w-4" />
</Button>
</div>
</div>
</div>
</form>
</div>
);
};
export default ChatInput;
Hi guys! I can't install trpc with npm. Any suggestions? Thanks.
npm ERR! code ERESOLVE
ERESOLVE unable to resolve depency tree.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.