We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi!
I just migrated from angular 14 to angular 15 and then 16 while upgrading my packages but I get a runtime error when I include ng2-logger.
Uncaught TypeError: Cannot set properties of undefined (setting 'black') at 91202 (tnp-core.mjs:471:34)
I dug a little deeping and it seems to be caused by the "tnp-core lib/node-chalk-mock.ts" dependency declared for the ng2-logger project.
`-- [email protected] `-- [email protected] `-- [email protected]
I target es2022 in tsconfig.
This is caused by something for target es2022 that generates this wrong code in tnp-core/lib/node-chalk-mock :
const allObj = { black(a) { console.log(a); }, gray(a) { console.log(a); }, red(a) { console.log(a); }, green(a) { console.log(a); }, italic(a) { console.log(a); }, magenta(a) { console.log(a); }, bold(a) { console.log(a); }, underline(a) { console.log(a); }, }; const map = new Map(); const all = Object.keys(allObj).map(key => { map.set(allObj[key], key); return allObj[key]; }); for (let i = 0; i < all.length; i++) { const e1 = all[i]; for (let j = 0; j < all.length; j++) { const e2 = all[j]; e1.prototype[map.get(e2)] = e2; } }
If I override ng2-logger to use tnp-config/[email protected], then it works.
"overrides": { "ng2-logger": { "tnp-config": "16.0.14", "tnp-core": "16.0.14" } },
Let me know if I can provide any more information!
The text was updated successfully, but these errors were encountered:
Hi @Jahrenski I will have a look on this today.
Sorry, something went wrong.
No branches or pull requests
Hi!
I just migrated from angular 14 to angular 15 and then 16 while upgrading my packages but I get a runtime error when I include ng2-logger.
Uncaught TypeError: Cannot set properties of undefined (setting 'black') at 91202 (tnp-core.mjs:471:34)
I dug a little deeping and it seems to be caused by the "tnp-core lib/node-chalk-mock.ts" dependency declared for the ng2-logger project.
I target es2022 in tsconfig.
This is caused by something for target es2022 that generates this wrong code in tnp-core/lib/node-chalk-mock :
If I override ng2-logger to use tnp-config/[email protected], then it works.
Let me know if I can provide any more information!
The text was updated successfully, but these errors were encountered: