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 'name' of undefined using log4js (^6.4.0) with angular in ssr mode #1225
TypeError: Cannot read property 'name' of undefined using log4js (^6.4.0) with angular in ssr mode #1225
Comments
Angular: 12.2.16 |
Seems similar to #1186 (comment). The error is thrown during the import of The verification by NodeJS 14.18.1 should have It does seem like |
I have some findings:
|
@myuniverse8, I'm not sure how we can move ahead. My gut feel is zone.js/node (which is https://github.com/angular/angular/tree/master/packages/zone.js). Yet fs-extra should have some form of defensive coding. Perhaps you can try filing an issue with zone.js/node? Alternatively, while technically it's not their issue, you can try filing an issue with fs-extra with the findings in the hopes that they can consider re-adding the checks to have some form of defensive-coding as I doubt only Angular is affected. There should be more collateral damage somewhat. |
I have filed an the following issues/PRs on @myuniverse8's behalf in both zone.js/node and fs-extra.
@myuniverse8, you might want to head to both and push for it further. |
Hi, @peteriman, thank you very much for your investigation and your help! I will check both issues/PRs. |
I have the same problem in Node v8.11.3,
|
@zhaosheng808, The dependency chain is
Without the check, it assumes
|
Hi, @peteriman , I've upgraded NodeJS to v12. Now it can be used normally. thank you very much~ |
@zhaosheng808, you are welcome. I'm glad you got it resolved. 🤗 |
Instead of waiting for the next release Currently, if
Once Fixed in @myuniverse8 Please try it out and get back to me. Thanks! |
@peteriman it works for me now. Thank you and your colleagues very much for your support and the quick fix! |
Just an update, it has been defensively patched in jprichardson/node-fs-extra#953 and released in But still, why is In the next version of |
Reverted the interim patch in Released |
Hello,
I am facing one issue in chain of packages: "log4js" -> "streamroller" -> "fs-extra" -> "graceful-fs" and "universalify"
This is the way how it could be reproduced:
The error will be in terminal:
After some investigations I have found that in last versions of "log4js" the version of "streamroller" was changed from "2.x.x" to "3.x.x" which caused changing the version of "fs-extra" to the last one.
The issue occurs in "universalify" package which is used by "fs-extra":
If we go step up in the callstack then we see this part of code in "fs-extra":
Previously it has a verification that prevented this issue:
But it was changed in this commit jprichardson/node-fs-extra@f4a880d:
In this case maybe "graceful-fs" should be updated in order to return proper value in this case, because it doesn't return proper value for fs.realpath.native:
With "log4js" version 6.3.0 there is no such issue because it uses the old version of "streamroller" which uses the old version of "fs-extra" which has versification mentioned above.
I am not sure on which package I should report this issue but I see it because I am using "log4js" so maybe this is the right place to start.
Could you please check it?
Thank you very much for your help in advance.
Best Regards,
Andrei
The text was updated successfully, but these errors were encountered: