Today, I decided to migrate my ASP .NET MVC 5 project from bootstrap 3 to bootstrap 4 (the sass version).
After the migration, I got an error after the compilation of my project.
Error Build:Cannot find name 'Record'.
Error Build:Cannot find name 'undefined'.
How to solve this?
After some research, I found this link to have a better understanding of typescript and visual studio. If you want to improve your skills, you can go to this official page and have some readings.
The solution You just have to update the typescript plugin for Visual studio. You can download the latest version here for visual studio 2015.
Here for visual studio 2017
Enjoy!
If, for some reason you are unable to update your Visual Studio with the updated TypeScript .exe file (company/business IT policy, non-admin account, etc...), you can try this solution:
Now, you'll be able to build your project without these errors.
Update 2019 I have found another workaround/solution that hasn't had any noticeable effects and still allows me to compile without erroring on index.d.ts. Just comment line 68 in your index.d.ts file as such:
//[name: string]: (BaseModifier & Record<string, any>) | undefined;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With