TypeScript error - 'index.ts' cannot be compiled under '--isolatedModules'
Open
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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