openapi-directory-js icon indicating copy to clipboard operation
openapi-directory-js copied to clipboard

File casing produces error on Webpack v5

Open blueputty01 opened this issue 2 years ago • 1 comments

When building with Webpack v5, the following error is generated (emphasis mine):

✖ 「wdm」: 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. /home/blueputty01/code/httptoolkit-ui/dist/api/azure.com/azsadmin-quotas.json /home/blueputty01/code/httptoolkit-ui/dist/api/azure.com/azsadmin-Quotas.json at checkSimilarFile (/home/blueputty01/code/httptoolkit-ui/node_modules/webpack/lib/Compiler.js:666:11) at writeOut (/home/blueputty01/code/httptoolkit-ui/node_modules/webpack/lib/Compiler.js:848:11) at /home/blueputty01/code/httptoolkit-ui/node_modules/webpack/lib/util/fs.js:242:5 at Immediate._onImmediate (/home/blueputty01/code/httptoolkit-ui/node_modules/memory-fs/lib/MemoryFileSystem.js:303:5) at processImmediate (node:internal/timers:476:21)

When this error is resolved by renaming one of the indicated files eg Quotas to quotas2, subsequent errors for files like sql-databaseSecurityAlertPolicies.json and sql-DatabaseSecurityAlertPolicies.json are generated.

blueputty01 avatar Feb 25 '23 21:02 blueputty01

Good spot, thanks for reporting this @blueputty01! I think this mainly is an issue for https://github.com/APIs-guru/openapi-directory/, where this data comes from. I've filed an issue upstream to see if we can clean that up and they're looking at that now. We could probably handle this better here too though, I'll look into it.

pimterry avatar Feb 27 '23 11:02 pimterry