quicktype icon indicating copy to clipboard operation
quicktype copied to clipboard

TypeScript error: Cannot find name 'Map'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later..

Open gitmalong opened this issue 4 years ago • 2 comments

npm install @solana/spl-token-registry
npm_config_yes=true npx quicktype node_modules/@solana/spl-token-registry/dist/main/lib/tokenlist.d.ts -o src/models.rs

Output:

Error: TypeScript error: Cannot find name 'Map'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later..

https://github.com/solana-labs/token-list/blob/main/src/lib/tokenlist.ts

gitmalong avatar Dec 30 '21 16:12 gitmalong

I got the same error despite the fact that tsconfig.json specifies "lib": ["es2020"],

lguminski avatar Jan 25 '23 09:01 lguminski

I got the same error in the turbo repo, even though i am correctly extending my tsconfig from typescript-config/base .json file. Any solution?

SadiqVali786 avatar Jan 29 '25 15:01 SadiqVali786