fosslover
fosslover
TTCTheo's Typesafe Cult
Created by fosslover on 9/16/2023 in #questions
Invalid URL - next build - Next.js
TypeError: Failed to parse URL from /api
at new Request (A:\Abirami\Learning\HeberDashboard\node_modules\next\dist\compiled\undici\index.js:2:42773)
at new Request (A:\Abirami\Learning\HeberDashboard\node_modules\next\dist\server\node-polyfill-fetch.js:12:17)
... 3 lines matching cause stack trace ...
at processTicksAndRejections (node:internal/process/task_queues:96:5) {
[cause]: TypeError [ERR_INVALID_URL]: Invalid URL
at new NodeError (node:internal/errors:387:5)
at URL.onParseError (node:internal/url:564:9)
at new URL (node:internal/url:640:5)
at new Request (A:\Abirami\Learning\HeberDashboard\node_modules\next\dist\compiled\undici\index.js:2:42745)
at new Request (A:\Abirami\Learning\HeberDashboard\node_modules\next\dist\server\node-polyfill-fetch.js:12:17)
at r (A:\Abirami\Learning\HeberDashboard\.next\server\chunks\238.js:6692:65)
at doOriginalFetch (A:\Abirami\Learning\HeberDashboard\node_modules\next\dist\server\lib\patch-fetch.js:275:24)
at A:\Abirami\Learning\HeberDashboard\node_modules\next\dist\server\lib\patch-fetch.js:412:20
at processTicksAndRejections (node:internal/process/task_queues:96:5) {
input: '/api',
code: 'ERR_INVALID_URL'
}
}

> Build error occurred
Error: Call retries were exceeded
at ChildProcessWorker.initialize (A:\Abirami\Learning\HeberDashboard\node_modules\next\dist\compiled\jest-worker\index.js:1:11661)
at ChildProcessWorker._onExit (A:\Abirami\Learning\HeberDashboard\node_modules\next\dist\compiled\jest-worker\index.js:1:12599)
at ChildProcess.emit (node:events:513:28)
at ChildProcess.emit (node:domain:489:12)
at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12) {
type: 'WorkerError'
}
[ ] - info Generating static pages (3/4)
TypeError: Failed to parse URL from /api
at new Request (A:\Abirami\Learning\HeberDashboard\node_modules\next\dist\compiled\undici\index.js:2:42773)
at new Request (A:\Abirami\Learning\HeberDashboard\node_modules\next\dist\server\node-polyfill-fetch.js:12:17)
... 3 lines matching cause stack trace ...
at processTicksAndRejections (node:internal/process/task_queues:96:5) {
[cause]: TypeError [ERR_INVALID_URL]: Invalid URL
at new NodeError (node:internal/errors:387:5)
at URL.onParseError (node:internal/url:564:9)
at new URL (node:internal/url:640:5)
at new Request (A:\Abirami\Learning\HeberDashboard\node_modules\next\dist\compiled\undici\index.js:2:42745)
at new Request (A:\Abirami\Learning\HeberDashboard\node_modules\next\dist\server\node-polyfill-fetch.js:12:17)
at r (A:\Abirami\Learning\HeberDashboard\.next\server\chunks\238.js:6692:65)
at doOriginalFetch (A:\Abirami\Learning\HeberDashboard\node_modules\next\dist\server\lib\patch-fetch.js:275:24)
at A:\Abirami\Learning\HeberDashboard\node_modules\next\dist\server\lib\patch-fetch.js:412:20
at processTicksAndRejections (node:internal/process/task_queues:96:5) {
input: '/api',
code: 'ERR_INVALID_URL'
}
}

> Build error occurred
Error: Call retries were exceeded
at ChildProcessWorker.initialize (A:\Abirami\Learning\HeberDashboard\node_modules\next\dist\compiled\jest-worker\index.js:1:11661)
at ChildProcessWorker._onExit (A:\Abirami\Learning\HeberDashboard\node_modules\next\dist\compiled\jest-worker\index.js:1:12599)
at ChildProcess.emit (node:events:513:28)
at ChildProcess.emit (node:domain:489:12)
at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12) {
type: 'WorkerError'
}
[ ] - info Generating static pages (3/4)
I'm facing this error while building next build Repo link: https://github.com/artist-who-codes/HeberDashboard next dev works fine though
4 replies
TTCTheo's Typesafe Cult
Created by fosslover on 7/24/2023 in #questions
Zod File Upload validation
I'm currently making a file upload form is there any way to validate a file in zod? I tried this https://github.com/colinhacks/zod/issues/387#issuecomment-1191390673 but it didn't seem to work No matter what file i upload it just says image is required https://rentry.co/ndimv A gist of my code
97 replies