Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PDF parsing fails #102

Open
zaini opened this issue Jan 29, 2025 · 0 comments
Open

PDF parsing fails #102

zaini opened this issue Jan 29, 2025 · 0 comments

Comments

@zaini
Copy link

zaini commented Jan 29, 2025

Error is below. I'm using WSL. But it doesn't work on just Windows 10 either. Node versions 18, 20 and 23 tried.

 ⨯ ./node_modules/cheerio/node_modules/undici/lib/web/fetch/util.js
Module parse failed: Unexpected token (860:57)
|       // 5. If object is not a default iterator object for interface,
|       //    then throw a TypeError.
>       if (typeof this !== 'object' || this === null || !(#target in this)) {
|         throw new TypeError(
|           `'next' called on an object that does not implement interface ${name} Iterator.`

Import trace for requested module:
./node_modules/cheerio/node_modules/undici/lib/web/fetch/util.js
./node_modules/cheerio/node_modules/undici/lib/web/fetch/response.js
./node_modules/cheerio/node_modules/undici/index.js
./node_modules/cheerio/dist/esm/index.js
./node_modules/@langchain/community/dist/document_loaders/web/cheerio.js
./node_modules/@langchain/community/document_loaders/web/cheerio.js
./node_modules/@upstash/rag-chat/dist/base/index.mjs
./src/utils/rag-chat.ts
./src/app/api/chat/route.ts
 ⨯ ./node_modules/cheerio/node_modules/undici/lib/web/fetch/util.js
Module parse failed: Unexpected token (860:57)
|       // 5. If object is not a default iterator object for interface,
|       //    then throw a TypeError.
>       if (typeof this !== 'object' || this === null || !(#target in this)) {
|         throw new TypeError(
|           `'next' called on an object that does not implement interface ${name} Iterator.`

Import trace for requested module:
./node_modules/cheerio/node_modules/undici/lib/web/fetch/util.js
./node_modules/cheerio/node_modules/undici/lib/web/fetch/index.js
./node_modules/cheerio/node_modules/undici/index.js
./node_modules/cheerio/dist/esm/index.js
./node_modules/@langchain/community/dist/document_loaders/web/cheerio.js
./node_modules/@langchain/community/document_loaders/web/cheerio.js
./node_modules/@upstash/rag-chat/dist/base/index.mjs
./src/utils/rag-chat.ts
./src/app/api/chat/route.ts
 ⨯ ./node_modules/cheerio/node_modules/undici/lib/web/fetch/util.js
Module parse failed: Unexpected token (860:57)
|       // 5. If object is not a default iterator object for interface,
|       //    then throw a TypeError.
>       if (typeof this !== 'object' || this === null || !(#target in this)) {
|         throw new TypeError(
|           `'next' called on an object that does not implement interface ${name} Iterator.`

Import trace for requested module:
./node_modules/cheerio/node_modules/undici/lib/web/fetch/util.js
./node_modules/cheerio/node_modules/undici/lib/web/fetch/index.js
./node_modules/cheerio/node_modules/undici/index.js
./node_modules/cheerio/dist/esm/index.js
./node_modules/@langchain/community/dist/document_loaders/web/cheerio.js
./node_modules/@langchain/community/document_loaders/web/cheerio.js
./node_modules/@upstash/rag-chat/dist/base/index.mjs
./src/utils/rag-chat.ts
./src/app/api/chat/route.ts
        "@upstash/rag-chat": "^1.0.2",
        "@upstash/redis": "^1.34.3",
        "@upstash/vector": "^1.1.4",
        "@vercel/node": "^3.2.1",
        "ai": "^3.2.16",
        "ai-stream-experimental": "^2.2.2",
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant