You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
<e> [webpack-dev-middleware] ModuleNotFoundError: Module not found: Error: Can't resolve './Table' in 'C:\dev\shifts\shifts\src\pages\teamConfig\allocations'
<e> at C:\dev\shifts\shifts\node_modules\webpack\lib\Compilation.js:2100:28
<e> at C:\dev\shifts\shifts\node_modules\webpack\lib\NormalModuleFactory.js:904:13
<e> at eval (eval at create (C:\dev\shifts\shifts\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:10:1)
<e> at C:\dev\shifts\shifts\node_modules\webpack\lib\NormalModuleFactory.js:341:22
<e> at eval (eval at create (C:\dev\shifts\shifts\node_modules\tapable\lib\HookCodeFactory.js:33:10), <anonymous>:9:1)
<e> at C:\dev\shifts\shifts\node_modules\webpack\lib\NormalModuleFactory.js:518:22
<e> at C:\dev\shifts\shifts\node_modules\webpack\lib\NormalModuleFactory.js:151:11
<e> at C:\dev\shifts\shifts\node_modules\webpack\lib\NormalModuleFactory.js:776:25
<e> at C:\dev\shifts\shifts\node_modules\webpack\lib\NormalModuleFactory.js:988:8
<e> at C:\dev\shifts\shifts\node_modules\webpack\lib\NormalModuleFactory.js:1118:5
<e> resolve './Table' in 'C:\dev\shifts\shifts\src\pages\teamConfig\allocations'
<e> using description file: C:\dev\shifts\shifts\package.json (relative path: ./src/pages/teamConfig/allocations)
<e> Field 'browser' doesn't contain a valid alias configuration
<e> using description file: C:\dev\shifts\shifts\package.json (relative path: ./src/pages/teamConfig/allocations/Table)
<e> no extension
<e> Field 'browser' doesn't contain a valid alias configuration
<e> C:\dev\shifts\shifts\src\pages\teamConfig\allocations\Table doesn't exist
<e> .ts
<e> Field 'browser' doesn't contain a valid alias configuration
<e> C:\dev\shifts\shifts\src\pages\teamConfig\allocations\Table.ts doesn't exist
<e> .tsx
<e> Field 'browser' doesn't contain a valid alias configuration
<e> C:\dev\shifts\shifts\src\pages\teamConfig\allocations\Table.tsx doesn't exist
<e> .js
<e> Field 'browser' doesn't contain a valid alias configuration
<e> C:\dev\shifts\shifts\src\pages\teamConfig\allocations\Table.js doesn't exist
<e> as directory
<e> C:\dev\shifts\shifts\src\pages\teamConfig\allocations\Table doesn't exist
<e> .tsx
<e> Field 'browser' doesn't contain a valid alias configuration
<e> C:\dev\shifts\shifts\src\pages\teamConfig\allocations\Table.tsx doesn't exist
<e> .js
<e> Field 'browser' doesn't contain a valid alias configuration
<e> C:\dev\shifts\shifts\src\pages\teamConfig\allocations\Table.js doesn't exist
<e> .tsx
<e> Field 'browser' doesn't contain a valid alias configuration
<e> C:\dev\shifts\shifts\src\pages\teamConfig\allocations\Table.tsx doesn't exist
<e> .js
<e> Field 'browser' doesn't contain a valid alias configuration
<e> .tsx
<e> Field 'browser' doesn't contain a valid alias configuration
<e> C:\dev\shifts\shifts\src\pages\teamConfig\allocations\Table.tsx doesn't exist
<e> .js
<e> .tsx
<e> Field 'browser' doesn't contain a valid alias configuration
<e> .tsx
<e> Field 'browser' doesn't contain a valid alias configuration
<e> .tsx
<e> .tsx
<e> .tsx
<e> Field 'browser' doesn't contain a valid alias configuration
<e> C:\dev\shifts\shifts\src\pages\teamConfig\allocations\Table.tsx doesn't exist
<e> .js
<e> Field 'browser' doesn't contain a valid alias configuration
<e> C:\dev\shifts\shifts\src\pages\teamConfig\allocations\Table.js doesn't exist
<e> as directory
<e> C:\dev\shifts\shifts\src\pages\teamConfig\allocations\Table doesn't exist
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.
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 -
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: