Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Cannot find name 'Map'. Do you need to change your target library?

Upon executing the command tsc app.ts, an error is generated with the following message.

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

My desired outcome is for the code to compile flawlessly and for the import statement to function properly.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

When you run tsc main.ts, your tsconfig.json file is not being used. Instead run tsc -p or simply tsc.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading