platforms
platforms copied to clipboard
<Image /> TypeError: Invalid URL
Hello, I've trouble with Image while deployed in production.
When working in localhost with dev server it works perfectly:
But when deployed in production on Vercel, I got an error in Logs:
https://nmjhpbgvbzkikazppran.supabase.co/storage/v1/object/public/pizzas/b6fb0ccd-8d17-477e-a2f4-490ce2fa51bd/1/Pizza-with-green-leaves.jpg&w=16&q=75
at new Request (node:internal/deps/undici/undici:5855:19)
at a (/var/task/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:180691)
... 4 lines matching cause stack trace ...
at async m (/var/task/.next/server/app/[domain]/page.js:10:413) {
digest: '1153500190',
[cause]: TypeError: Invalid URL
at new URL (node:internal/url:796:36)
at new Request (node:internal/deps/undici/undici:5853:25)
at a (/var/task/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:180691)
at B (/var/task/.next/server/chunks/948.js:2:6846)
at /var/task/.next/server/chunks/948.js:2:9092
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async u (/var/task/.next/server/app/[domain]/page.js:1:4823)
at async m (/var/task/.next/server/app/[domain]/page.js:10:413) {
code: 'ERR_INVALID_URL',
input: 'undefined/_next/image?url=https://nmjhpbgvbzkikazppran.supabase.co/storage/v1/object/public/pizzas/b6fb0ccd-8d17-477e-a2f4-490ce2fa51bd/1/Pizza-with-green-leaves.jpg&w=16&q=75'
}
}
⨯ TypeError: Failed to parse URL from undefined/_next/image?url=https://nmjhpbgvbzkikazppran.supabase.co/storage/v1/object/public/pizzas/b6fb0ccd-8d17-477e-a2f4-490ce2fa51bd/1/Pizza-with-bell-peppers.jpg&w=16&q=75
at new Request (node:internal/deps/undici/undici:5855:19)
at a (/var/task/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:180691)
... 4 lines matching cause stack trace ...
at async m (/var/task/.next/server/app/[domain]/page.js:10:413) {
digest: '4115992318',
page: '/big-pizz.crustify.fr',
[cause]: TypeError: Invalid URL
at new URL (node:internal/url:796:36)
at new Request (node:internal/deps/undici/undici:5853:25)
at a (/var/task/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:180691)
at B (/var/task/.next/server/chunks/948.js:2:6846)
at /var/task/.next/server/chunks/948.js:2:9092
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async u (/var/task/.next/server/app/[domain]/page.js:1:4823)
at async m (/var/task/.next/server/app/[domain]/page.js:10:413) {
code: 'ERR_INVALID_URL',
input: 'undefined/_next/image?url=https://nmjhpbgvbzkikazppran.supabase.co/storage/v1/object/public/pizzas/b6fb0ccd-8d17-477e-a2f4-490ce2fa51bd/1/Pizza-with-bell-peppers.jpg&w=16&q=75'
}
}
TypeError: Failed to parse URL from undefined/_next/image?url=https://nmjhpbgvbzkikazppran.supabase.co/storage/v1/object/public/pizzas/b6fb0ccd-8d17-477e-a2f4-490ce2fa51bd/1/Pizza-with-bell-peppers.jpg&w=16&q=75
at new Request (node:internal/deps/undici/undici:5855:19)
at a (/var/task/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:180691)
... 4 lines matching cause stack trace ...
at async m (/var/task/.next/server/app/[domain]/page.js:10:413) {
digest: '4115992318',
page: '/big-pizz.crustify.fr',
[cause]: TypeError: Invalid URL
at new URL (node:internal/url:796:36)
at new Request (node:internal/deps/undici/undici:5853:25)
at a (/var/task/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:180691)
at B (/var/task/.next/server/chunks/948.js:2:6846)
at /var/task/.next/server/chunks/948.js:2:9092
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async u (/var/task/.next/server/app/[domain]/page.js:1:4823)
at async m (/var/task/.next/server/app/[domain]/page.js:10:413) {
code: 'ERR_INVALID_URL',
input: 'undefined/_next/image?url=https://nmjhpbgvbzkikazppran.supabase.co/storage/v1/object/public/pizzas/b6fb0ccd-8d17-477e-a2f4-490ce2fa51bd/1/Pizza-with-bell-peppers.jpg&w=16&q=75'
}
}
Node.js process exited with exit status: 1. The logs above can help with debugging the issue.
Which leads to a 500 internal server error
The fun fact, on https://app.[domain]
, it works just fine: