Can't generate code with ranged Typescript version
See original GitHub issueWhat are the steps to reproduce this issue?
- Set the Typescript version to
"typescript": ">=4.3.4 <5.0.0"
from package.json - Run the code generation.
What happens?
It will throw an error Oups... 🍻. An Error occurred while splitting => Error: Invalid argument not valid semver ('>=4.3.4 <5.0.0' received)
What were you expecting to happen?
The code should be generated
Any logs, error output, etc?
Oups... 🍻. An Error occurred while splitting => Error: Invalid argument not valid semver ('>=4.3.4 <5.0.0' received)
Any other comments?
- As far as I observed, this error was came from
src/core/writers/target.ts
andcompare
function incompare-versions
- How about adding the typescriptVersion property to orval config to explicitly specify the typescript version? Right now, it depends on the generator package’s typescript version, but in my use case, I have two separate projects. The first one is generated code project, and the other is using that codes, which means they could be different typescript versions.
- My workaround is here
What versions are you using?
**Operating System: macOS Monterey 12.1 **Package Version: 6.7.1 **Browser Version: x
Issue Analytics
- State:
- Created a year ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
How to install older version of Typescript?
For installing typescript 1.7.5, use npm install typescript@1.7.5.
Read more >TypeScript Compiling with Visual Studio Code
No, the TypeScript language service that ships with Visual Studio 2019 and 2022 isn't compatible with VS Code. You will need to install...
Read more >Can typescript please follow semver? So ...
Typescript versions aren't like other node package versions. Now sure how they increment and who decides version numbers.
Read more >Documentation - TypeScript 3.9
Visual Studio Code supports selecting different versions of TypeScript. Alternatively, there's the JavaScript/TypeScript Nightly Extension to stay on the ...
Read more >TypeScript | IntelliJ IDEA Documentation
Make sure the JavaScript and TypeScript plugin is enabled in the settings. Press Ctrl+Alt+S to open the IDE settings and select Plugins. Click ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
As always you are the best!
@melloware fixed