Skip to content

nonsugarless/reproduction-for-type-error-in-vercel-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Reproduction for type error in vercel cli

Type errors occur at vercel dev runtime, probably because vercel cli is ignoring the typescript version of the project. Overriding the version does not solve this problem.

Reproduction steps

  1. Install dependencies.
npm i
  1. Create new vercel project and link to this repository.
vercel
  1. Change the root directory to src at the project settings page.

  2. Import the project settings to local.

vercel pull
  1. Start server.
npm start
  1. Access to API endpoints.

  2. Your terminal will report type errors like below.

Satisfies Operator

api/satisfies-operator.ts:9:3 - error TS1005: ',' expected.

} satisfies Record<Colors, string | RGB>;

api/satisfies-operator.ts:9:13 - error TS1005: ',' expected.

} satisfies Record<Colors, string | RGB>;

api/satisfies-operator.ts:9:19 - error TS1005: ',' expected.

} satisfies Record<Colors, string | RGB>;

api/satisfies-operator.ts:9:26 - error TS1005: '>' expected.

} satisfies Record<Colors, string | RGB>;

api/satisfies-operator.ts:9:41 - error TS1109: Expression expected.

} satisfies Record<Colors, string | RGB>;

Found 5 errors.

Private Identifiers

api/private-identifiers.ts:4:3 - error TS18028: Private identifiers are only available when targeting ECMAScript 2015 and higher.

#_message() {

Found 1 error.