TypeScript version is old ^3.4.5
See original GitHub issueDo you want to request a feature or report a bug? Feature? But feels like a bug to me
What is the current behaviour?
can’t use the latest version of typescript, which is suggested in the preact docs themselves, because preact-cli
specifies an old typescript version of ^3.4.5
If the current behaviour is a bug, please provide the steps to reproduce.
yarn add preact-cli typescript
- Put
"jsxImportSource": "preact"
as the preact docs tell you to for TypeScript support with modern typescript - try to compile with
tsc
, you get an error:Unknown compiler option 'jsxFragmentFactory'.
- can’t follow the docs on Preact!
What is the expected behaviour?
It works and uses the newer version of typescript
If this is a feature request, what is motivation or use case for changing the behaviour?
I want to use modern features
Please mention other relevant information.
Environment Info:
System:
OS: macOS 11.2
CPU: (4) x64 Intel(R) Core(TM) i5-6267U CPU @ 2.90GHz
Binaries:
Node: 14.3.0 - /var/folders/ct/hs211d3n09nb3d6nkmv7j7g80000gn/T/yarn--1612505637634-0.13322901752400163/node
Yarn: 1.22.5 - /var/folders/ct/hs211d3n09nb3d6nkmv7j7g80000gn/T/yarn--1612505637634-0.13322901752400163/yarn
npm: 6.14.5 - ~/.nvm/versions/node/v14.3.0/bin/npm
Browsers:
Chrome: 88.0.4324.146
Firefox: 80.0.1
Safari: 14.0.3
Issue Analytics
- State:
- Created 3 years ago
- Comments:17 (8 by maintainers)
Top Results From Across the Web
3.4.5 - typescript - npm
TypeScript is a language for application scale JavaScript development. Latest version: 4.9.4, last published: 18 days ago.
Read more >Documentation - TypeScript 3.5
TypeScript 3.5 improves on 3.4's incremental build mode, by saving information about how the state of the world was calculated - compiler settings,...
Read more >The Angular Compiler requires TypeScript >=3.4.0 and <3.5.0 ...
It seems like you have the latest version (v3.5.3) of TypeScript installed. You should be installing TypeScript v3.4.5 instead, which is the ...
Read more >typescript | Yarn - Package Manager
Important: This documentation covers modern versions of Yarn. For 1.x docs, see classic.yarnpkg.com. Yarn.
Read more >How do I Fix a TypeScript Version Mismatch when Upgrading ...
Jeffry Houser's Blog: How do I Fix a TypeScript Version Mismatch when ... tells me node to install 3.4.5, why was a later...
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
Preact itself has no dependencies. Those are all devDeps.
Some of those dependencies cannot be touched in Preact-CLI, no. We’re on Webpack 4 still, though a PR is open for 5 (see #1645)
Upgrading TS in CLI would do nothing. You should be providing your own install of TS.
Hey Ryan, all clear. I have listed it in my package now. Using a multi-package repository setup with Lerna, where one of the packages is a Preact app. Already had specific versions in root package, however seems not to resolve correctly. After being specific within module it started working.
Root package has: “typescript”: “~4.4.4”, Preact app module was supposed to share dependency from root, however was building with 4.2.4 instead.
Perhaps is a Lerna issue. Thanks again.
On Mon, Feb 14, 2022, 20:27 Ryan Christian @.***> wrote: