Skip to content
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

allow usage with typescript 4.5 beta #1519

Closed
SimonSiefke opened this issue Oct 17, 2021 · 3 comments
Closed

allow usage with typescript 4.5 beta #1519

SimonSiefke opened this issue Oct 17, 2021 · 3 comments

Comments

@SimonSiefke
Copy link

Desired Behavior

It would be nice to use ts-node with typescript 4.5 beta

Is this request related to a problem?

Yes: When installing typescript 4.5 beta and ts-node, npm shows an error that ts-node doesn't support typescript 4.5 beta:

simon (main #) ts-node-typescript-4.5 $ npm i -D typescript@beta ts-node
npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR! 
npm ERR! While resolving: [email protected]
npm ERR! Found: [email protected]
npm ERR! node_modules/typescript
npm ERR!   dev typescript@"4.5.0-beta" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peer typescript@">=2.7" from [email protected]
npm ERR! node_modules/ts-node
npm ERR!   dev ts-node@"*" 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.
npm ERR! 
npm ERR! See /home/simon/.npm/eresolve-report.txt for a full report.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/simon/.npm/_logs/2021-10-17T07_09_56_454Z-debug.log

Alternatives you've considered

Additional context

@cspotcode
Copy link
Collaborator

We actually run our test suite against typescript nightly builds. I'm guessing that the error you're seeing here is erroneously raised by a package manager.

Here is a link to our package.json file:
https://unpkg.com/[email protected]/package.json

Do you see anything in there that would be causing the error that you are seeing?

@SimonSiefke
Copy link
Author

You're right, it seems to be related to npm: I've found npm/npm#8854: Version comparators exclude rc releases:

4.5.0-beta (unexpectedly) just doesn't satisify >=2.7

@cspotcode
Copy link
Collaborator

Ok, thanks for sharing your research.

For what it's worth, we could possibly change our peerDependencies declaration if it would help you. But I always assume that npm v7 will "do the right thing" as far as auto-installing peerDependencies, so we would want to ensure we do not break that behavior.

Based on reading sindresorhus/ow#225, it sounds like you're ok with waiting till typescript 4.5 is stable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants