-
Notifications
You must be signed in to change notification settings - Fork 36
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
Error in POST handler: ReferenceError: File is not defined #2
Comments
Hi @sandipan1, have you tried with the example file provided? The error suggests that there is an issue with the file, so would be curious to know if it happens with the example file as well. |
Yes it's the same error with sample file Details`> [email protected] dev
▲ Next.js 14.2.11
✓ Starting... |
Ok, I can't reproduce by using the version that's currently in the repo.
Thanks! |
I am getting this error when I run resume extraction
Details
`Received files: [ File { size: 42130, type: 'application/pdf', name: 'resume_november.pdf', lastModified: 1736501089769 } ] Error in POST handler: ReferenceError: File is not defined at eval (webpack-internal:///(rsc)/./app/api/extract_resume/route.ts:59:41) at new Promise () at parsePDF (webpack-internal:///(rsc)/./app/api/extract_resume/route.ts:56:12) at POST (webpack-internal:///(rsc)/./app/api/extract_resume/route.ts:93:34) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async /Users/sandipan/projects/AI/structured-outputs-samples/resume-extraction/node_modules/next/dist/compiled/next-server/app-route.runtime.dev.js:6:55755 at async eO.execute (/Users/sandipan/projects/AI/structured-outputs-samples/resume-extraction/node_modules/next/dist/compiled/next-server/app-route.runtime.dev.js:6:46523) at async eO.handle (/Users/sandipan/projects/AI/structured-outputs-samples/resume-extraction/node_modules/next/dist/compiled/next-server/app-route.runtime.dev.js:6:57089) at async doRender (/Users/sandipan/projects/AI/structured-outputs-samples/resume-extraction/node_modules/next/dist/server/base-server.js:1359:42) at async cacheEntry.responseCache.get.routeKind (/Users/sandipan/projects/AI/structured-outputs-samples/resume-extraction/node_modules/next/dist/server/base-server.js:1581:28) at async DevServer.renderToResponseWithComponentsImpl (/Users/sandipan/projects/AI/structured-outputs-samples/resume-extraction/node_modules/next/dist/server/base-server.js:1489:28) at async DevServer.renderPageComponent (/Users/sandipan/projects/AI/structured-outputs-samples/resume-extraction/node_modules/next/dist/server/base-server.js:1920:24) at async DevServer.renderToResponseImpl (/Users/sandipan/projects/AI/structured-outputs-samples/resume-extraction/node_modules/next/dist/server/base-server.js:1958:32) at async DevServer.pipeImpl (/Users/sandipan/projects/AI/structured-outputs-samples/resume-extraction/node_modules/next/dist/server/base-server.js:917:25) at async NextNodeServer.handleCatchallRenderRequest (/Users/sandipan/projects/AI/structured-outputs-samples/resume-extraction/node_modules/next/dist/server/next-server.js:272:17) at async DevServer.handleRequestImpl (/Users/sandipan/projects/AI/structured-outputs-samples/resume-extraction/node_modules/next/dist/server/base-server.js:813:17) at async /Users/sandipan/projects/AI/structured-outputs-samples/resume-extraction/node_modules/next/dist/server/dev/next-dev-server.js:339:20 at async Span.traceAsyncFn (/Users/sandipan/projects/AI/structured-outputs-samples/resume-extraction/node_modules/next/dist/trace/trace.js:154:20) at async DevServer.handleRequest (/Users/sandipan/projects/AI/structured-outputs-samples/resume-extraction/node_modules/next/dist/server/dev/next-dev-server.js:336:24) at async invokeRender (/Users/sandipan/projects/AI/structured-outputs-samples/resume-extraction/node_modules/next/dist/server/lib/router-server.js:173:21) at async handleRequest (/Users/sandipan/projects/AI/structured-outputs-samples/resume-extraction/node_modules/next/dist/server/lib/router-server.js:350:24) at async requestHandlerImpl (/Users/sandipan/projects/AI/structured-outputs-samples/resume-extraction/node_modules/next/dist/server/lib/router-server.js:374:13) at async Server.requestListener (/Users/sandipan/projects/AI/structured-outputs-samples/resume-extraction/node_modules/next/dist/server/lib/start-server.js:141:13) POST /api/extract_resume 500 in 1566ms `The text was updated successfully, but these errors were encountered: