Error: Prevent writing to file that only differs in casing or query string from already written file. reactjs laravel
Asked Answered
A

3

8

I am working on a laravel reactjs project and when I run the command npm run dev the compilation stuck at 95% and give the following error. I checked in the whole project there is no file calling with the case-sensitive names all images are calling with the lower case letters.

Error: Prevent writing to file that only differs in casing or query string from already written file.
This will lead to a race-condition and corrupted files on case-insensitive file systems.
/media/public/images/user-4.jpg
/media/public/images/user-4.jpg

React: 17.0.1

Webpack: 5.21.2

Node: 14.15.2

Amara answered 11/2, 2021 at 10:1 Comment(3)
Check this github.com/microsoft/TypeScript/issues/… maybe you have a similar issueKahle
I did the same but not working for meAmara
If it is possible please share webpack file with usSplashdown
C
3

I have the same issue used lowercase letters and it resolved

Cronus answered 2/8, 2021 at 7:40 Comment(1)
Can you provide solution example?Mutazilite
O
1

I got a similar error. the solution is as follows

/media/public/images/user-4.jpg
/media/public/images/user-4.jpg

rewrite

[name]user-4.jpg

I think your problem is path .

Ought answered 22/3, 2021 at 19:14 Comment(1)
Please use text formatting options available in StackOverflow editor, it will help to improve the readability of your answer.Ghassan
E
0

In my case I had two entrypoints in my webpack.config.js and mistakenly had not modified the second one.

So changing

entry: { main: './src/index.tsx', another: './src/index.tsx' }

to

entry: { main: './src/index.tsx', another: './src/someOtherIndex.tsx' }

fixed the error

Ean answered 13/4, 2023 at 15:11 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.