Import module issue with HMR #541
Comments
@whitecolor
|
will close this for now, let us know otherwise :) |
something is weird, it is really working, I tried npm install and not yarn, maybe yarn is the issue? |
Not sure how it can even be related. But I removed
Did you follow the flow described: Load page, first uncomment first two lines (debounce), reload should occur, and then uncomment the rest two lines (throttle)? |
please, nuke your node_modules folder, fuse cache folder and build folder, start fresh. I assure you that i followed something is really off! try to nuke everything, including your build folder! |
Well I do this, the same result, maybe someone else will try? I'm doing this on Windows, though not sure why it should really matter for this case. |
@whitecolor, i am on windows too! |
Ok, when you first load the page, your bundle doesn't contain the target library. On an HMR you are getting an error, and fusebox is trying to reload the page cuz the module wasn't loaded at all. My assumption is that something wrong happens in between. Does it work for you if you bundle with uncommented section of your code, and keep working? |
Yes of course it works, check the repo yourself. |
Well I don't have any problem there, whatsoever ;-) like @devmondo |
v6.10.2 |
could you update to latest node please and see |
I tried setup
result
|
I'm installed latest stable 6.10.3, the same result. |
I've added watch via docker and latest node image, it should use more immutable environment, please try it, see changed instructions in readme. |
@whitecolor, I really think this is some OS related or hardware issue on your side. This is crazy as per above you can see that 3 different people on 3 different OSes and machines cloned and tried your repo, and there was no issue. @nchanged is there anything else possible we are missing, you might think of here? |
@devmondo did you try docker version? |
@nchanged |
Could it be related to how fast you click save? |
I just save one time when I uncomment. It probably can relate to that change event is firing multiple times or something and fuse-box doesn't handle it well. Need to debug. |
i think i know the issue, it is race condition, it happened to me with webstorm, try to open your project in notepad and not in VS code and see if this helps |
I tried with nodepad++ (notepad doesn't hanldle well LF line endings). Error is still here. And I see nothing wrong with handling events https://github.com/fuse-box/fuse-box/blob/master/src/core/BundleProducer.ts#L98 there is no any racing events. |
man! your case is crazy, can you try it on another machine( real not VM) |
We tried (two different people) and get the error on two different machines windows and linux. I'm not sure why don't get the error. In some case it is still should occur. I will try to provide better example or debug myself. |
@whitecolor I believe that can happen. We have been struggling for a very long to get it to the state where it is now, but it's not perfect. Let me know if can help debugging it. |
Happens to me, too (linux, vscode) |
I'm getting the error too (linux, node 7.10) |
so windows & mac work, linux seems to have an issue... |
I'm getting this on Windows too, you may see on my comment |
You guys ... is it a blocker? :) |
Nope. Tree-shaking is more important. :) |
Good cuz I rather focus on a feature I am working ATM, it's quite an important one, and yes tree shaking is coming soon |
out of interest, those of you who are facing this issue, do you have SSD drives or normal drives? |
Just an annoying bug.
SSD drives, Docker on windows uses SMB protocol There is seem to be something wrong with a logic of injecting new dependencies, not platform specifics. |
@whitecolor Does fuse refresh the page automatically? (Cuz it should if a package is not found) |
@nchanged could it be polling issue? should we test it with |
Normal drive here. Haven't tested on my laptop SSD. |
guys could you upgrade to latest beta we enabled passing options to let us know please :) |
this should be working now with the latest version. we will close this for now but let us know otherwise :) |
fuse-box 2.0.0
The issue can be reproduced with the repo https://github.com/whitecolor/fuse-box-xstream
The text was updated successfully, but these errors were encountered: