I'm brand new to the front-end and I'm likely very dumb. However, in a nutshell, if I do this
yarn add @mapbox/polyline
I suddenly get all kinds of helpful errors like this when I yarn start:
undefined
TypeScript error in undefined(undefined,undefined):
Cannot find type definition file for 'bin'. TS2688
undefined
TypeScript error in undefined(undefined,undefined):
Cannot find type definition file for 'src'. TS2688
index.js:1 undefined
TypeScript error in undefined(undefined,undefined):
Cannot find type definition file for 'test'. TS2688
Ok cool. So I've royally broken this (git) branch (been there!), so let's just switch back to the working master branch... but yarn start yields the same errors on master now! It's as if the mere act of typing yarn add @mapbox/polyline corrupts something locally so badly that it's unrecoverable. I end up having to clone my repo again and start fresh.
(Since I'm using Typescript, I also tried adding types yarn add @types/mapbox__polyline... this does nothing to alleviate my pain.)
Any idea how to fix this?