简体   繁体   English

如何解决找不到找不到模块'../home/featuredRooms'或其对应的类型声明。?

[英]how to solve cannot find Cannot find module '../home/featuredRooms' or its corresponding type declarations.?

I am getting this weird error,when i deploy my site to netlify or vercel, but this project runs correctly in my computer.当我将我的网站部署到 netlify 或 vercel 时,我遇到了这个奇怪的错误,但是这个项目在我的计算机上正常运行。 I am using typescript with next js.我正在使用 typescript 和下一个 js。 I Also tried to rename folders to lowercase我还尝试将文件夹重命名为小写

Here is the github link:- https://github.com/Sumukha210/hotel-booking这是 github 链接:- 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 .您在文件系统中的实际路径是../Home/featuredRooms

You're most likely using a macOS device locally, where paths are case-insensitive so no issues occur.您很可能在本地使用 macOS 设备,其中路径不区分大小写,因此不会出现问题。 However, when deployed to your hosting services Linux machines with case-sensitive paths are used, so ../home/featuredRooms will not be valid.但是,当部署到您的托管服务 Linux 机器时使用区分大小写的路径,因此../home/featuredRooms将无效。

As a general rule of thumb I'd suggest you always use lowercase folder/file names to avoid these kind of issues.作为一般经验法则,我建议您始终使用小写文件夹/文件名来避免此类问题。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 找不到模块“module.css”或其相应的类型声明 - Cannot find module 'module.css' or its corresponding type declarations 找不到模块“react-lazily”或其相应的类型声明 - Cannot find module 'react-lazily' or its corresponding type declarations codesandbox - 找不到模块 PACKAGE 或其相应的类型声明 - codesandbox - Cannot find module PACKAGE or its corresponding type declarations 找不到模块“graphql-hooks”或其相应的类型声明 - Cannot find module 'graphql-hooks' or its corresponding type declarations 找不到模块“./App.svelte”或其对应的类型声明 - Cannot find module './App.svelte' or its corresponding type declarations 如何修复找不到模块“./aws-export”或其对应的类型 declarations.ts (2307) - How to fix Cannot find module './aws-export' or its corresponding type declarations.ts (2307) “找不到模块‘./something.module.scss’或其相应的类型声明 - "Cannot find module './something.module.scss' or its corresponding type declarations React,Storybook - TS2307:找不到模块“按钮”或其相应的类型声明 CAN SB RESOLVE? - React,Storybook - TS2307: Cannot find module 'Button' or its corresponding type declarations CAN SB RESOLVE? 找不到模块“@react-navigation/native”或其相应的类型声明 - Cannot find module '@react-navigation/native' or its corresponding type declarations Docker/Next js:: 找不到模块“@mui/x-date-pickers/AdapterDateFns”或其相应的类型声明 - Docker/Next js :: Cannot find module '@mui/x-date-pickers/AdapterDateFns' or its corresponding type declarations
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM