Next.js 16 with Typescript 7: build error
Unanswered
Šarplaninac posted this in #help-forum
ŠarplaninacOP
Tried to upgrade my Next 16 app with the new Typescript 7.0.2 version that came out today/yesterday. When running the 'next build' command, I'm seeing an error (see below).
(To isolate the error, I created a brand new next-app, updated all packages to the latest and then ran 'next build'. The result below is from that, but in my real app I'm seeing the exact same.)
xyz@MAC-05-06 next16-ts7 % pnpm run build
✓ Lockfile passes supply-chain policies (131 entries in 1.2s)
Lockfile is up to date, resolution step is skipped
Already up to date
Done in 1.6s using pnpm v11.10.0
$ next build
▲ Next.js 16.2.10 (Turbopack)
Creating an optimized production build ...
✓ Compiled successfully in 1823ms
Running TypeScript .It looks like you're trying to use TypeScript but do not have the required package(s) installed.
Installing dependencies
If you are not trying to use TypeScript, please remove the tsconfig.json file from your package root (and any TypeScript files in your app and pages directories).
Installing devDependencies (pnpm):
- typescript
Running TypeScript ...✓ Lockfile passes supply-chain policies (verified 5s ago)
Progress: resolved 1, reused 0, downloaded 0, added 0
Running TypeScript ..Progress: resolved 10, reused 10, downloaded 0, added 0
Running TypeScript .Progress: resolved 61, reused 28, downloaded 0, added 0
Running TypeScript ..Already up to date
Progress: resolved 131, reused 55, downloaded 0, added 0, done
Done in 2.6s using pnpm v11.10.0
Running TypeScript ...The "id" argument must be of type string. Received undefined
Next.js build worker exited with code: 1 and signal: null
[ELIFECYCLE] Command failed with exit code 1.
(To isolate the error, I created a brand new next-app, updated all packages to the latest and then ran 'next build'. The result below is from that, but in my real app I'm seeing the exact same.)
xyz@MAC-05-06 next16-ts7 % pnpm run build
✓ Lockfile passes supply-chain policies (131 entries in 1.2s)
Lockfile is up to date, resolution step is skipped
Already up to date
Done in 1.6s using pnpm v11.10.0
$ next build
▲ Next.js 16.2.10 (Turbopack)
Creating an optimized production build ...
✓ Compiled successfully in 1823ms
Running TypeScript .It looks like you're trying to use TypeScript but do not have the required package(s) installed.
Installing dependencies
If you are not trying to use TypeScript, please remove the tsconfig.json file from your package root (and any TypeScript files in your app and pages directories).
Installing devDependencies (pnpm):
- typescript
Running TypeScript ...✓ Lockfile passes supply-chain policies (verified 5s ago)
Progress: resolved 1, reused 0, downloaded 0, added 0
Running TypeScript ..Progress: resolved 10, reused 10, downloaded 0, added 0
Running TypeScript .Progress: resolved 61, reused 28, downloaded 0, added 0
Running TypeScript ..Already up to date
Progress: resolved 131, reused 55, downloaded 0, added 0, done
Done in 2.6s using pnpm v11.10.0
Running TypeScript ...The "id" argument must be of type string. Received undefined
Next.js build worker exited with code: 1 and signal: null
[ELIFECYCLE] Command failed with exit code 1.
2 Replies
Chum salmon
yeah I've run into similar problems. I'm hoping 16.3 release or next preview (if there is one) will add support for typescript 7.
Bighead carp
I have a lot of doubt that nextjs will support ts7 until ts7.1, as they plan on having API support in that version onwards