Despite upgrading all packages, deleting node_modules and package-lock.json, and reinstalling with npm install
, the typescript runtime in my git repo is still showing version 4.9.5.
How can I update the tsc
version to be higher than 5.0?
$ npx tsc --version
Version 4.9.5
$ ./node_modules/.bin/tsc --version
Version 4.9.5
In my NPM monorepo, all packages list "typescript" as a dev dependency. Previously, I uninstalled typescript from each package using "npm uninstall typescript", then re-added it via "npm install typescript -D" to reflect the new major version (from v4 to v5).
When building one of my packages (create-react-app), ESLint indicates that I am using typescript version 4.9.5.
WARNING: You are currently running a version of TypeScript which is not officially supported by @typescript-eslint/typescript-estree.
You may find that it works just fine, or you may not.
SUPPORTED TYPESCRIPT VERSIONS: >=3.3.1 <4.9.0
YOUR TYPESCRIPT VERSION: 4.9.5
Please only submit bug reports when using the officially supported version.
None of my package.json files or package-lock.json file display v4. They all show v5.
$ npm list --depth=0 | grep -i typescript
│ └── [email protected]
...
I am currently using node 16.19 and npm 8.11 via nvm.
EDIT: This post focuses on Typescript within a NPM workspaces mono repo, not React or Create-React-App. Apologies for any confusion.