I am getting this weird error,when i deploy my site to netlify or vercel, but this project runs correctly in my computer. I am using typescript with next js. I Also tried to rename folders to lowercase
Here is the github link:- https://github.com/Sumukha210/hotel-booking
Error occurred prerendering page "/gallery". Read more:
https://nextjs.org/docs/messages/prerender-error
23:50:55.380 TypeError: pathname.replaceAll is not a function
Your actual path in the file system is ../Home/featuredRooms
.
You're most likely using a macOS device locally, where paths are case-insensitive so no issues occur. However, when deployed to your hosting services Linux machines with case-sensitive paths are used, so ../home/featuredRooms
will not be valid.
As a general rule of thumb I'd suggest you always use lowercase folder/file names to avoid these kind of issues.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.