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
GitHub
GitHub - artist-who-codes/HeberDashboard: Project Regarding Academi...
Project Regarding Academics in 5th Semester. Contribute to artist-who-codes/HeberDashboard development by creating an account on GitHub.
3 Replies
ebitzu.
ebitzu.16mo ago
hi, ran the code locally you get the same error when you go to localhost:3000/
ebitzu.
ebitzu.16mo ago
No description
ebitzu.
ebitzu.16mo ago
maybe I need a mongo server
Want results from more Discord servers?
Add your server