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
Should properly detect and use the existing cache.
Actual Behavior
Even if the cache is in good condition, it fails to recognize it and builds a new cache every time.
P.S. I do observe that the rebuilds are still faster than the first build. But do worry about the integrity of files being compiled based on the existing cache.
Is an error being thrown?
Yes. Below is the stack trace.
First - build output:
hardsource:6c0f43d8] Writing new cache 6c0f43d8...
[hardsource:6c0f43d8] Tracking node dependencies with: package.json, node_modules/*.
Rebuild output:
[hardsource:6c0f43d8] Using 100 MB of disk space.
[hardsource:6c0f43d8] Tracking node dependencies with: package.json, node_modules/*.
[hardsource:6c0f43d8] Reading from cache 6c0f43d8...
[hardsource:6c0f43d8] Cache is corrupted.
TypeError: Cannot read property 'concat' of undefined
at _loaders.thaw.map.loader (D:\Perforce_CXWeb\CallXpress\CX_Next\CXWeb\NodeJS\node_modules\hard-source-webpack-plugin\lib\util\serial.js:78:58)
at Array.map ()
at Object.thaw (D:\Perforce_CXWeb\CallXpress\CX_Next\CXWeb\NodeJS\node_modules\hard-source-webpack-plugin\lib\util\serial.js:69:55)
at Object.thaw (D:\Perforce_CXWeb\CallXpress\CX_Next\CXWeb\NodeJS\node_modules\hard-source-webpack-plugin\lib\util\serial.js:171:28)
at contextNormalModuleResolve (D:\Perforce_CXWeb\CallXpress\CX_Next\CXWeb\NodeJS\node_modules\hard-source-webpack-plugin\lib\CacheModuleResolver.js:202:38)
at Object.keys.forEach.key (D:\Perforce_CXWeb\CallXpress\CX_Next\CXWeb\NodeJS\node_modules\hard-source-webpack-plugin\index.js:342:29)
at Array.forEach ()
at source (D:\Perforce_CXWeb\CallXpress\CX_Next\CXWeb\NodeJS\node_modules\hard-source-webpack-plugin\index.js:341:33)
at
at process._tickDomainCallback (internal/process/next_tick.js:228:7)
[hardsource:6c0f43d8] Last compilation did not finish saving. Building new cache.
@gauravmahto Thank you for opening this issue. I accounted for webpack 4 and forgot to account for webpack 3 RuleSet creation in serializing Module resolutions.
Expected Behavior
Actual Behavior
Is an error being thrown?
First - build output:
hardsource:6c0f43d8] Writing new cache 6c0f43d8...
[hardsource:6c0f43d8] Tracking node dependencies with: package.json, node_modules/*.
Rebuild output:
[hardsource:6c0f43d8] Using 100 MB of disk space.
[hardsource:6c0f43d8] Tracking node dependencies with: package.json, node_modules/*.
[hardsource:6c0f43d8] Reading from cache 6c0f43d8...
[hardsource:6c0f43d8] Cache is corrupted.
TypeError: Cannot read property 'concat' of undefined
at _loaders.thaw.map.loader (D:\Perforce_CXWeb\CallXpress\CX_Next\CXWeb\NodeJS\node_modules\hard-source-webpack-plugin\lib\util\serial.js:78:58)
at Array.map ()
at Object.thaw (D:\Perforce_CXWeb\CallXpress\CX_Next\CXWeb\NodeJS\node_modules\hard-source-webpack-plugin\lib\util\serial.js:69:55)
at Object.thaw (D:\Perforce_CXWeb\CallXpress\CX_Next\CXWeb\NodeJS\node_modules\hard-source-webpack-plugin\lib\util\serial.js:171:28)
at contextNormalModuleResolve (D:\Perforce_CXWeb\CallXpress\CX_Next\CXWeb\NodeJS\node_modules\hard-source-webpack-plugin\lib\CacheModuleResolver.js:202:38)
at Object.keys.forEach.key (D:\Perforce_CXWeb\CallXpress\CX_Next\CXWeb\NodeJS\node_modules\hard-source-webpack-plugin\index.js:342:29)
at Array.forEach ()
at source (D:\Perforce_CXWeb\CallXpress\CX_Next\CXWeb\NodeJS\node_modules\hard-source-webpack-plugin\index.js:341:33)
at
at process._tickDomainCallback (internal/process/next_tick.js:228:7)
[hardsource:6c0f43d8] Last compilation did not finish saving. Building new cache.
Looking at the source:
defaultRules - Undefined?
Steps to Reproduce
Operating System, Node, and NPM dependency versions
The text was updated successfully, but these errors were encountered: