-
-
Notifications
You must be signed in to change notification settings - Fork 286
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
[BUG] tsed/di v7 does not work with new version of @tsed/logger (v7) #2917
Comments
I've tested directly editing package-lock to use older version for tsed logger and reinstalled dependencies after only these changes. With this change the errors are gone, so it does seem to be an issue with tsed logger. I changed >=6.7.5 for all tsed related dependencies to ^6.7.5:
|
This also affects version 6 (6.133.1). |
Tsed logger v7 only support esm eco system. Please read the release not: https://github.com/tsedio/logger/releases/tag/v7.0.0 For tsed v7, use v6 logger version. I close this issue! |
I can fix the di package.json for v7 branch to lock update. But isn’t supposed to occurs, if you I already installed logger on your project (lock file, should have v6). The only reason, you have this issue it’s because I have manually updated the logger @SavvasVincentTamosaitis. Right? Also, @tsed/logger v7 work with @tsed/di v7 for esm. So lock the v7 logger usage for these projects isn’t a good solution, because esm is the future of node.js. I encourage you to migrate your project on esm and to v7/v8 (v6 is outdated so I won’t release fix for that). |
My project is not dependent on tsed/logger or tsed/logger-file except through, so it is installing per the semantic versioning rules set in other tsed packages. I have a workaround to override the versioning set by these packages. I think it's likely that, if this issue was only resolved for tsed/di, other tsed packages may cause the same issue. I have tried migrating to esm to solve this; my migration probably wasn't complete as my attempts did not solve the issue. No problem with not resolving the issue for v6- I added this insight to provide more information. |
Your project depend on @tsed/logger if you use @tsed/common. The CLI add To migrate your project on v7: To migrate your poject on v8: Also generate a project using CLI and pick the package.json configuration (scripts, tools, tsconfig) to help you. I can also help on ESM migration if you are blocked (but you have to take tiers sponsors for that - one time tiers or recurrent- here: https://github.com/sponsors/Romakita) See you |
I ran into a similar issue with most v7 versions of If you are still on v7 of TsED and can't upgrade to v8 yet, you can add the following to your package.json:
And then re-install |
Hi @csnate @SavvasVincentTamosaitis I haven’t applied a strict version flag, to let any project to use any version of the tsed logger. It wasn’t an issue until right know, due to the ecosystem migration to ESM. I finally published to fix, one for v6 and one for v7, to lock the logger version and close this issue ^^. see you and sorry again for this issue! |
Describe the bug
Note: The title is my best guess about what is going on based on the errors below and observing the diffs between package-lock files resulting in working and broken builds.
After deleting old package-lock or similar, using @tsed/di as import, I get an error when testing with jest (on the files that include tsed/di import) and when starting with node. Note: I do not import logger for my project.
Testing the files with jest gives me this error
Starting with node ("start": "node dist/index.js",) gives me:
To Reproduce
Attempt to start an app that uses tsed/di (^7.0.0).
I suspect this may also be an issue for other tsed package in v7 which are dependent on "@tsed/logger": ">=6.7.5" as well.
Expected behavior
Errors do not occur when starting an app with v7 tsed dependencies that are dependent on @tsed/logger
Code snippets
No response
Repository URL example
No response
OS
macOS
Node version
v18.20.4 and v20.17.0
Library version
v7.84.1
Additional context
No response
The text was updated successfully, but these errors were encountered: