-
-
Notifications
You must be signed in to change notification settings - Fork 431
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
Crash when adding/removing files in watch-mode since 0.9.5 #358
Comments
@johnnyreilly Sorry for accidentally posting before writing my issue. I added a description now. Maybe you could reopen it now? Unfortunately I was not yet able to reproduce this behavior in a simple demo-repository outside of a meteor project but I was able to circumvent/fix this issue with a little undefined check. Thanks in advance. |
Thanks for the report! |
(and suggestion 😄 ) |
Do you fancy submitting a PR with your suggested fix in? I think it's an improvement and so I say we should include it. |
prevent adding/removing files crashes - fixes #358
Thank you very much for fixing this. I'm using v1.2.0 now and didn't had any crashes since. |
No problem - to be honest the other changes are just refactoring. The actual solution is down to you - I just implemented it differently. Thanks for suggesting! |
Since version 0.9.5 ts-loader crashes for me when adding new ts-files, deleting and maybe other cases.
I can say for sure that switching from 0.9.5/1.0.0 back to 0.9.4 fixes this issue.
Steps:
Workaround/Fix:
Change the line https://github.com/TypeStrong/ts-loader/blob/master/src/after-compile.ts#L63 makes this error go away.
from
Object.keys(instance.modifiedFiles).forEach ...
to
Object.keys(instance.modifiedFiles || {}).forEach ...
I'm not sure if this is a good fix or if this might cause other troubles - so I did not create a pull request.
Environment:
I know that the configuration (Webpack 2.x, Webpack integrated into Meteor...) is not really supported. But as I can definitely say that this was introduced with 0.9.5 and a fix is probably as easy as the undefined check, this might still be worth reporting.
The text was updated successfully, but these errors were encountered: