In my project, there is a file located at
/app/client/modules/activity/pages/New/hooks.ts
. The folder name is New
, with the first letter capitalized.
During the webpack build process, I encountered the following error:
ERROR in /root/app/client/modules/activity/pages/new/index.tsx
ERROR in /root/app/client/modules/activity/pages/new/index.tsx(5,45):
TS1261: Already included file name '/root/app/client/modules/activity/pages/new/hooks.ts' differs from file name '/root/app/client/modules/activity/pages/New/hooks.ts' only in casing.
The file is in the program because:
Imported via './hooks' from file '/root/app/client/modules/activity/pages/new/index.tsx'
Root file specified for compilation
tsconfig.json
:
{
"forceConsistentCasingInFileNames": true,
}
- OS: macOS
- Disk info:
File System Personality: APFS
Type (Bundle): apfs
Name (User Visible): APFS
I came across a similar question on Stack Overflow regarding 'File name differs from already included file name only in casing' which can be found here.
I have decided to maintain the forceConsistentCasingInFileNames
configuration as true
.