You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Please update class-transformer dependency to the latest version #783
However, right now it requires class-transformer@0.3.1 (exact version 0.3.1) as a peer dependency. This prevents my project from using the latest version of the class-transformer (which is 0.4.0).
This generates the following error on npm install:
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: @acme/project
npm ERR! Found: class-transformer@0.4.0
npm ERR! node_modules/class-transformer
npm ERR! class-transformer@"0.4.0" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer class-transformer@"^0.3.1" from routing-controllers@0.9.0
npm ERR! node_modules/routing-controllers
npm ERR! routing-controllers@"0.9.0" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
Would you be so kind to update class-transformer dependency to the latest version?
Also, it would be much easy to avoid these kind of issues if you would switch to a stable semver range (major version > 0) because it would allow to match dependencies in a more relaxed manner.
Reacted by Asa Hardcastle, ms-sch, Auke Bruinsma, Patrick Sturm, Rob Taylor, taisei-yamamoto-nc, aaarichter, Antonín Grund, Sebastián Alejandro Blázquez Olivera, amellalkamel and 5 more
Dependency update sounds even more urgent because of the latest security vulnerability fixes for the following packages:
class-validator => 0.13.2 (changelog)
class-transformer => 0.5.0 (changelog)
Reacted by Sonny T., Krzysztof Szatanik, Luiz Rosa, Sebastián Alejandro Blázquez Olivera, amellalkamel, Dani, Aniruddha Joshi and leonardlin
Reacted by amellalkamel
Reacted by amellalkamel, Angel S. Moreno and Clay Dunston
Seems like there are no real breaking changes in terms of class-transformer usage (I might be wrong here) so you can just update the package since it is only a peer dependency.
Seems like there are no real breaking changes in terms of class-transformer usage (I might be wrong here) so you can just update the package since it is only a peer dependency.
We're working with TypeScript and we get some type differences that reflect breaking changes in the library.
Never saw that syntax before, but this is working for me.
@Killasushi - Could you please share your full package.json? Is there additional config you needed to do to point at the aliases? Doesn't seem to be doing the trick on my end.
Activity
slavafomin commentedon Oct 8, 2021
The same issue is with
class-validator.Also, it would be much easy to avoid these kind of issues if you would switch to a stable semver range (major version > 0) because it would allow to match dependencies in a more relaxed manner.
SandraShklyaeva commentedon Nov 22, 2021
Dependency update sounds even more urgent because of the latest security vulnerability fixes for the following packages:
class-validator => 0.13.2 (changelog)
class-transformer => 0.5.0 (changelog)
biton-ron commentedon Dec 9, 2021
Same issue for us, a fix will be a great help.
Thanks!
juniopereirab commentedon Dec 14, 2021
Same problem here...
TypeError: class transformer 1.classToPlain is not a function
RatakondalaArun commentedon Dec 17, 2021
Is there any workaround for this?
I want to use
exposeDefaultValueswhich was added in v0.3.2amellalkamel commentedon Jan 25, 2022
+1
this is a serious issue
seblaz commentedon Mar 21, 2022
Hi @NoNameProvided @attilaorosz, would you mind having a look at the pr? Thanks!
zSakuraEvilz commentedon Apr 9, 2022
Is there no new update for this issue?
attilaorosz commentedon Apr 9, 2022
Seems like there are no real breaking changes in terms of class-transformer usage (I might be wrong here) so you can just update the package since it is only a peer dependency.
biton-ron commentedon Apr 27, 2022
We're working with TypeScript and we get some type differences that reflect breaking changes in the library.
saschajunius commentedon Jun 8, 2022
I just found a workaround which seems to work, you can install two versions of the same package using an alias:
npm install class-validator12@npm:class-validator@0.12.2npm install class-transformer3@npm:class-transformer@0.3.1My package.json now looks like this:
Never saw that syntax before, but this is working for me.
pfgallagher commentedon Jun 8, 2022
@Killasushi - Could you please share your full package.json? Is there additional config you needed to do to point at the aliases? Doesn't seem to be doing the trick on my end.
3 remaining items
spicemc commentedon Jul 14, 2022
I am using overrides in my package.json. This is my workaround:
Try with
npm install --legacy-peer-depsto get it running.JotaRaffalli commentedon Jul 28, 2022
Pls, update this 😮💨
laujonat commentedon Jul 30, 2022
No temporary workarounds?
spicemc commentedon Aug 29, 2022
Did you try my suggested workaround?
Rasfuranku commentedon Oct 31, 2022
Trying to install
"routing-controllers": "^0.9.0"in a new project, having the same issue.jstanislawczyk commentedon Nov 14, 2022
Please update it. It's hard to use it in new project when it has such big issue
spicemc commentedon Nov 14, 2022
i forked it. Feel free to use it in your projects.
NoNameProvided commentedon Nov 16, 2022
Hi folks! I have added branch protection bypass to @attilaorosz so he will be able to handle this.
FrancisBehnen commentedon Nov 16, 2022
Awesome, I've let the team know!
github-actions commentedon Dec 27, 2022
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.