Next.js compilation not reflecting changes in /api/shop/get_product_by_id

35 views Asked by At

I'm encountering an issue with Next.js where changes made to the /api/shop/get_product_by_id route are not triggering compilation. Even though the log indicates that the /shop/product/[category]/[product_name] route has been successfully compiled, the compilation status for the /api/shop/product/ route does not seem to update as expected.

Here's a snippet from the compilation log:

Compiling /shop/product/[category]/[product_name] ...
 ✓ Compiled /shop/product/[category]/[product_name] in 6.7s (470 modules)
 ✓ Compiled in 512ms (243 modules)
 ✓ Compiled in 187ms (227 modules)

Sometimes it works, for example if I wait a few minutes and then save the file using ctrl+save it works. It works 100% when I delete the .next folder from my project and then run npm run dev again, but it is very uncomfortable. Please if anyone know how to solve that problem help me. Thank you.

0

There are 0 answers