KEMBAR78
Legacy TypeScript version support · Issue #16260 · vercel/next.js · GitHub
Skip to content

Legacy TypeScript version support #16260

@Timer

Description

@Timer

The latest canary Next.js is publishing types not compatible with old TS versions:

yarn run v1.22.4
$ cross-env NODE_ENV=production next build
info  - Loaded env from /Users/z/projects/front/.env.production
Failed to compile.
./node_modules/next/dist/next-server/lib/router/router.d.ts:5:13
Type error: '=' expected.
  3 | import { ComponentType } from 'react';
  4 | import { UrlObject } from 'url';
> 5 | import type { GoodPageCache } from '../../../client/page-loader';
    |             ^
  6 | import { MittEmitter } from '../mitt';
  7 | import { NextPageContext } from '../utils';
  8 | interface TransitionOptions {
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

This support was added in TypeScript 3.8.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions