-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ModuleNotFoundError with hard crash on file rename/move/delete #5256
Comments
Sounds like a duplicate of webpack/enhanced-resolve#395 |
Hi @alexander-akait, thank you for your reply. I have reviewed the issue you linked, but I don't think it is the same issue. I am not using enhanced-resolve at all. I have now created a small public repo where you can demo the issue - https://github.com/NathZ1/webpack-dev-server-error-repo Simply npm install, npm start, then rename the file 'src/FileToRename.tsx' and you should see the same webpack-dev-server crash as I am experiencing. |
Don't use
|
Ahh of course!! Apologies for taking up your time. Cheers |
Bug report
I renamed a file in my project called Table.tsx to Table2.tsx file webpack-dev-server was running. This consistancy causes the crash to occur. Happens with rename/move/delete of any file within project src.
error from IDE console:
Actual Behavior
Webpack-dev-server crashes when a file is renamed/deleted/moved etc. I'm not sure if this is a regression, but in a previous project it would throw an error in the console and the client but the server wouldn't crash.
Expected Behavior
It should throw an error saying the file is missing, but the server should continue to function without having to kill and restart.
How Do We Reproduce?
tsconfig.json:
webpack.config.ts:
Please paste the results of
npx webpack-cli info
here, and mention other relevant informationSystem:
OS: Windows 10 10.0.19045
CPU: (12) x64 12th Gen Intel(R) Core(TM) i7-1255U
Memory: 2.40 GB / 15.59 GB
Binaries:
Node: 20.11.1 - C:\Program Files\nodejs\node.EXE
npm: 10.2.4 - C:\Program Files\nodejs\npm.CMD
Browsers:
Edge: Chromium (127.0.2651.74)
Internet Explorer: 11.0.19041.4355
Packages:
copy-webpack-plugin: ^12.0.2 => 12.0.2
css-loader: ^7.1.1 => 7.1.2
css-minimizer-webpack-plugin: ^6.0.0 => 6.0.0
eslint-webpack-plugin: ^4.0.1 => 4.2.0
fork-ts-checker-webpack-plugin: ^9.0.0 => 9.0.2
html-webpack-plugin: ^5.5.1 => 5.6.0
postcss-loader: ^8.1.0 => 8.1.1
source-map-loader: ^5.0.0 => 5.0.0
style-loader: ^4.0.0 => 4.0.0
ts-loader: ^9.4.2 => 9.5.1
webpack: ^5.81.0 => 5.93.0
webpack-bundle-analyzer: ^4.9.0 => 4.10.2
webpack-cli: ^5.0.2 => 5.1.4
webpack-dev-server: ^5.0.4 => 5.0.4
webpack-manifest-plugin: ^5.0.0 => 5.0.0
workbox-webpack-plugin: ^7.0.0 => 7.1.0
The text was updated successfully, but these errors were encountered: