N
Nuxt3mo ago
Jure

Nuxt Image: IPX_FILE_NOT_FOUND

I have installed Nuxt Image module which works fine in dev mode, but not on production server. Production server is Ubuntu / Nginx. https://domain.com/_ipx/w_32/images/32955/i.jpg
{
"error": {
"message": "[404] [IPX_FILE_NOT_FOUND] File not found: /images/32955/i.jpg"
}
}
{
"error": {
"message": "[404] [IPX_FILE_NOT_FOUND] File not found: /images/32955/i.jpg"
}
}
File exists on the server:
ls -l public/images/32955/i.jpg
-rw-rw-r-- 1 hub hub 15054 Apr 18 14:06 public/images/32955/i.jpg
ls -l public/images/32955/i.jpg
-rw-rw-r-- 1 hub hub 15054 Apr 18 14:06 public/images/32955/i.jpg
I guess this is not problem with Nginx config since I get response from the IPX. Looks more like IPX can't find image on the server... or is looking for it on the wrong path. Any help debugging this would be much appreciated!
1 Reply
Jure
JureOP3mo ago
// ./.output/server/node_modules/ipx/dist/shared/ipx.b027cc1c.mjs
const filePath = join(dir, id)
console.log(filePath) <---
// ./.output/server/node_modules/ipx/dist/shared/ipx.b027cc1c.mjs
const filePath = join(dir, id)
console.log(filePath) <---
Output: /home/user/domain.com/.output/public/images/32934/i.jpg Like I've suspected... IPX is looking for image in the wrong dir (.output). How to fix this?
Want results from more Discord servers?
Add your server