Elliott-Chong / chatpdf-yt

https://chatpdf-elliott.vercel.app
641 stars 263 forks source link

Error when interacting with chat . #4

Closed Seronic2001 closed 9 months ago

Seronic2001 commented 9 months ago

error ./node_modules/@pinecone-database/pinecone/dist/utils/user-agent.js:27:22

Module not found: Can't resolve 'fs'

https://nextjs.org/docs/messages/module-not-found

Import trace for requested module: ./node_modules/@pinecone-database/pinecone/dist/utils/index.js ./node_modules/@pinecone-database/pinecone/dist/pinecone.js ./node_modules/@pinecone-database/pinecone/dist/index.js ./src/lib/context.ts ./src/app/api/chat/route.ts ./node_modules/next/dist/build/webpack/loaders/next-edge-app-route-loader/index.js?absolutePagePath=C%3A%5CUsers%5CShubh%5CDesktop%5CMini%20Project%5Cchatpdf%5Csrc%5Capp%5Capi%5Cchat%5Croute.ts&page=%2Fapi%2Fchat%2Froute&appDirLoader=bmV4dC1hcHAtbG9hZGVyP25hbWU9YXBwJTJGYXBpJTJGY2hhdCUyRnJvdXRlJnBhZ2U9JTJGYXBpJTJGY2hhdCUyRnJvdXRlJmFwcFBhdGhzPSZwYWdlUGF0aD1wcml2YXRlLW5leHQtYXBwLWRpciUyRmFwaSUyRmNoYXQlMkZyb3V0ZS50cyZhcHBEaXI9QyUzQSU1Q1VzZXJzJTVDU2h1YmglNUNEZXNrdG9wJTVDTWluaSUyMFByb2plY3QlNUNjaGF0cGRmJTVDc3JjJTVDYXBwJnBhZ2VFeHRlbnNpb25zPXRzeCZwYWdlRXh0ZW5zaW9ucz10cyZwYWdlRXh0ZW5zaW9ucz1qc3gmcGFnZUV4dGVuc2lvbnM9anMmcm9vdERpcj1DJTNBJTVDVXNlcnMlNUNTaHViaCU1Q0Rlc2t0b3AlNUNNaW5pJTIwUHJvamVjdCU1Q2NoYXRwZGYmaXNEZXY9dHJ1ZSZ0c2NvbmZpZ1BhdGg9dHNjb25maWcuanNvbiZiYXNlUGF0aD0mYXNzZXRQcmVmaXg9Jm5leHRDb25maWdPdXRwdXQ9JnByZWZlcnJlZFJlZ2lvbj0mbWlkZGxld2FyZUNvbmZpZz1lMzAlM0Qh&nextConfigOutput=&preferredRegion=&middlewareConfig=e30%3D!

diwberg commented 9 months ago

Same Problem here...

AdilCHBALY commented 9 months ago

same here this is gonna be a hard issue

AdilCHBALY commented 9 months ago

in order to fix this issue you will have to change the dependency of @pinecone-database/pinecone to : image

apparently the latest version doesnt support nextJS ES6 Modules and triggers the error but it works fine with this version hope its works and get back to coding ^^

Seronic2001 commented 9 months ago

in order to fix this issue you will have to change the dependency of @pinecone-database/pinecone to : image

apparently the latest version doesnt support nextJS ES6 Modules and triggers the error but it works fine with this version hope its works and get back to coding ^^

This worked thanks .