In SharePoint Online, how do I update my typescript version? I think I narrowed down my problem to typescript versioning. My helloworld web part works. The one thing that it has that many of my other web parts do not have is [tsc] typescript version: 3.3.4000 when I run gulp serve:

enter image description here

My many web parts that don't work, ALL have [tsc] typescript version: 3.2.4 and throw an error for no typescript rules.

Here is the [tsc] typescript version: 3.2.4 error message:

enter image description here

I think If I can get a working way to change the version of typescript when gulp serve runs may have a solution.

This is not a repeat of SharePoint Framework: how to change TypeScript version used by gulp?. While very helpful, I do not have a dependency for typescript, @microsoft/gulp-core-build-typescript": ">=2.2.5 <3.0.0 or anything like it.

I have rush compiler, which sets the typescript of 3.2:
"dependencies": { "@microsoft/rush-stack-compiler-3.2": "^0.5.12",

This is a good resource for people looking to change their typescript version: https://www.eliostruyf.com/define-the-typescript-version-you-want-to-use-in-sharepoint-framework/

Using SPFX 1.10.0, npm 6.13.4, node 10.16.0, gulp 3.9.1, CLI 2.2.0,

I ran npm list -g --depth=0 and have errors too:

enter image description here

  • 1
    Have you tried installing specific version of typescript like npm install typescript@3.3.4000? Also try adding the typescript dependency("dependencies": { "typescript": "^3.3.4000" }) in your package.json file and then run npm install. – Ganesh Sanap Jan 14 at 6:22
  • @Ganesh I tired both and it still has version 3.2.4 on gulp serve ..? and @Karthik While he offers good insight, I do not have those dependencies in my package.json :-) – Lance Bitner Jan 14 at 12:49