-
Notifications
You must be signed in to change notification settings - Fork 160
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
TypeError: Cannot read property 'hash' of undefined #416
Comments
@pustovalov can you confirm that _config.sass or _utils.sass appear only once in the debug output? I'm wondering if they are somehow trying to update their hashes twice. I'm not sure how that could happen though. |
@mzgoddard debug:
output:
second run:
|
Same thing here:
|
Same problem here. This issue seems to appear after the latest webpack update (4.16.4 -> 4.16.5) |
I am getting this error with webpack 4.16.4. |
any solutions? :( |
I'm having the same problem |
Ditto. |
Same here
|
Same problem |
same here .. any one found the solution yet ? |
Removing |
Latest version broke usage of |
possible solution: fork this repository and merge this PR: #419 |
The solution from @MrLesAubrey has worked for me so far. I guess if I see this error again I'll just do as he recommended (remove the contents of |
same problem after updating dep |
Same problem for me here. It happens very often when i update some dependencies while the wepack dev server is started. |
you can try to use this in
but it's better to use your own fork |
Im also gettng this error too. It goes away for a bit when i delete my cache folder but then will come back seemingly randomly |
@pustovalov just forked yours and it worked first try. Haven't done enough testing to see if it will come back but I had a complete blocking issue after installing |
* use hard-source fork with bugfix for mzgoddard/hard-source-webpack-plugin/issues/416 * flow-ignore hard source plugin
I am seeing this error as well |
Even this error is occurring the build is working fine for me. At least its not breaking anything . If its breaking anything please let me know |
@Superjisan you didn't fix anything. Just wait for a couple hours and you will get same problem over again. It will require you to delete the cache again and again. What is the purpose of this plugin than if you should always delete the cache and make a full rebuild? |
Cleaning node_modules/.cache folder will do it |
As recommended above we've been using hard-source-webpack-plugin-fixed-hashbug for a few months now and it's working great. This is PR'd in #497 if you want to follow it. |
@kadamwhite from the recent activity it sounds like this PR: #497 from @conorh is probably a good candidate for checking and merging per your #525 issue. I don't have much free time these days but I'll see if I can take some time tonight to take a more recent look. And it's been mentioned a couple times, but this thread is long enough that all the workarounds have been mentioned/disproved several times. If you're stumbling across this thread, be sure to read through before posting possible fixes, as there's already too much noise to be able to quickly understand what's been worked through already. Thanks! Update: looked through the existing PR and the travis errors are just from the linter failing, mostly on code that's already committed in master, so I made a comment that as far as I can tell it's safe to merge. |
@garethweaver I've tried hard-source-webpack-plugin-fixed-hashbug in my project. At first, it was working as expected, but in couple of hours I've started to get the same error ☹ |
Same error, only way I get to "solve it" is by removing cache folder, which makes this pointless if cache is removed all the time. So I removed this plugin from project since it seems unmaintained :/ |
I think this is related to cache corruption. I didn't have this problem at all, then I experienced an out-of-memory error. After that, I got these errors until removing the cache folder as instructed above. |
Add follow code in you
|
@lovemegowin in what way should it resolve the issue? I had this config right from the start and it doesn't affect cache corruption what so ever |
My question:
The solution is add config
|
@freedyc |
In nuxtjs app, I set into package.json
|
@VienArchway how does it help to solve an issue? Such command makes this module pointless since you have to regenerate cache again and again |
不是的 我的webpack 版本是4.0.0 |
I am getting this error with webpack 4.0.0. |
#461 (comment)
|
new HardSourceWebpackPlugin() 必须在之前被使用添加到plugin中。 |
here is a possible solution. please check~ @pustovalov @mzgoddard |
I stopped using this plugin after I found this behavior: #416 (comment) |
I use this solution to fix the problem, but it is not work, I get the same error after few moments |
Decided to switch to use And cache: {
cacheDirectory: path.resolve(__dirname, 'node_modules/.cache/.temp_cache'),
type: 'filesystem',
} to define a filesystem cache. Cached data will be stored in More info here https://webpack.js.org/configuration/cache/#cache |
I had the same issue with NextJS |
I had the same exact issue with the same exact versions and the solution was exactly the same (I use yarn instead of npm, but it worked just fine) |
it's not a solution at all, you just removed cache folder together with nuking node_modules so of course you don't see an error anymore since new cache is created but that makes this module useless with such "solutions" |
I didn't have this problem but unexpectedly it started to occur:
I then realized that I had a node_modules folder on my home. So I deleted it and the error was gone. |
Expected Behavior
Successful compilation from the first time
Actual Behavior
The first compilation failed, the second successful
Is an error being thrown?
debug:
log:
Steps to Reproduce
just run
webpack-dev-server
Operating System, Node, and NPM dependency versions
plugin configuration:
The text was updated successfully, but these errors were encountered: