DEV Community

Cover image for TypeScript 7 Migration: 4 tsconfig Errors and Their Fixes
ExtensionBooster
ExtensionBooster

Posted on Originally published at extenify.app

TypeScript 7 Migration: 4 tsconfig Errors and Their Fixes

Originally published on Extenify.

A TypeScript 7 migration is less about your code and more about your tsconfig.json. The new Go-based compiler is genuinely fast, but the first tsc run after upgrading often refuses to check a single file, and Chrome extension projects suddenly forget that chrome exists. Here are the four errors the Extenify team hit when moving a Manifest V3 extension and a Node.js server from TypeScript 5.9.3 to 7.0.2, what fixed each one, and how to keep your linter working in the meantime.

What actually changed in TypeScript 7

TypeScript 7.0 (stable since July 8, 2026) is the compiler rewritten in Go. It still ships as the typescript package and you still run tsc, so nothing looks different until you build. Three changes cause almost all of the migration pain:

  • Options deprecated in 6.0 are now hard errors. That includes baseUrl, moduleResolution: "node", target: "es5", downlevelIteration, and the amd/umd/systemjs module formats.
  • New defaults. types is now an empty list, strict is on, module is esnext, and rootDir defaults to the folder holding the tsconfig.
  • No compiler API in 7.0. Anything that imports typescript as a library (typescript-eslint, ts-node, Vue/Svelte/Astro language tools) still needs TypeScript 6.

The four errors, and the fix for each

1. Removed options (TS5108, TS5102). The compiler stops before type checking and tells you moduleResolution=node10 and baseUrl have been removed. Switch moduleResolution to "bundler" for anything a bundler builds (most extensions) or "nodenext" for code Node runs directly, then delete baseUrl.

The sneaky follow-up (TS5090). Once baseUrl is gone, every paths target must be relative to the tsconfig with a leading ./. This error only shows up after you fix the first one, so it is easy to think you are done when you are not.

2. Cannot find name 'chrome' (TS2304). This is the one that confuses extension developers, because @types/chrome is still installed. Older versions loaded every package in node_modules/@types automatically; TypeScript 7 loads none unless you list them. The flood of "implicitly has an any type" errors on your listener parameters comes from the same root cause.

3. Node.js globals vanish (TS2591). Same default, different project: process and node:fs disappear from server code. The error message itself tells you to add "node" to types. Add your test framework too, such as vitest/globals.

4. Checking a single file (TS5112). Running tsc src/popup.ts next to a tsconfig used to silently ignore the config. Now it fails. Use --ignoreConfig or give that script its own small tsconfig.

Here is the shape of the change for an extension config:

 {
   "compilerOptions": {
-    "target": "es2020",
-    "moduleResolution": "node",
-    "baseUrl": ".",
-    "paths": { "@/*": ["src/*"] },
+    "target": "es2022",
+    "moduleResolution": "bundler",
+    "types": ["chrome"],
+    "paths": { "@/*": ["./src/*"] },
     "strict": true,
     "noEmit": true
   }
 }
Enter fullscreen mode Exit fullscreen mode

For a Node.js backend, the equivalent is "module": "nodenext" with "types": ["node"]. A wildcard "types": ["*"] restores the old behavior, but naming what each config needs keeps Node globals out of browser code.

How much faster is it

On a 600-module test project (generics, mapped types, chrome.storage calls) on a 4 vCPU Linux box:

Version Full tsc --noEmit Memory
TypeScript 5.9.3 ~4.5 to 4.8 s ~213 to 223 MB
TypeScript 7.0.2 ~0.92 to 0.96 s ~151 MB

That is roughly 5x, below Microsoft's 7.7x to 11.9x on huge codebases like VS Code, because startup is a bigger slice of a small project. It still means CI type checks and editor feedback finish before you look away.

A safe migration order

  1. Get a clean build on TypeScript 6.0 first, with no ignoreDeprecations. Every option 7 removes is only a warning in 6, so you can fix them while everything still compiles.
  2. Rewrite the removed options and raise any es5 target to at least es2015.
  3. Add types to every tsconfig you have: extension, server, build scripts, tests.
  4. Set rootDir explicitly if you emit files. Without it, output can move from out/a.js to out/src/a.js.
  5. Install TypeScript 7 with optional dependencies enabled. It pulls a platform-specific binary, so make sure CI and Docker install their own.
  6. Keep TypeScript 6 for tooling via npm aliases or @typescript/typescript6 (which gives you tsc6), and run both checks in CI for a while.

Good news for WXT, Vite and esbuild users: your build does not change at all, since those tools strip types without checking them. The win is in the separate tsc --noEmit step. TypeScript 7.1, in beta since October 20, adds the new compiler API and hooks for Vue, Svelte, Astro and MDX, so if those are your blockers, keep everything except type checking on 6 until your tools ship support.

Key takeaways

  • Most TypeScript 7 errors are tsconfig errors, not code errors.
  • types now defaults to []: add "chrome" for extensions and "node" for servers.
  • Delete baseUrl and prefix every paths target with ./.
  • Expect a few-times speedup on small projects and much more on large ones.
  • Keep TypeScript 6 installed for typescript-eslint and ts-node until they support the 7.1 API.

The original article has the exact error output, both final tsconfig files and a tool compatibility table in the full TypeScript 7 migration guide for Chrome extensions and Node.js. And once the upgrade ships, Extenify's extension analytics dashboard can alert you if users, ratings or reviews move after the release.

Have you switched type checking to TypeScript 7 yet, and which tool in your stack is still holding you on version 6?

Top comments (0)