Uniswap / Uniswap/interface

TypeScript error - 'index.ts' cannot be compiled under '--isolatedModules'

Open
#2,077 3 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
TypeScript
Stars
5.5k
Forks
5.4k
PR merge metrics
No merged PRs in 30d

Description

While yarn build or yarn start I got an error:
TypeScript error in D:/.../uniswap-interface/src/abis/types/index.ts(undefined,undefined):
'index.ts' cannot be compiled under '--isolatedModules' because it is considered a global script file. Add an import, export, or an empty 'export {}' statement to make it a module. TS1208

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting src/abis/types/index.ts and the TypeScript configuration involved in yarn build or yarn start. Confirm the TS1208 error, then make the file a module as indicated by the compiler and rerun the build or start command; done means the error no longer appears.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
build-system
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.