I’m migrating a codebase from Flow to TypeScript. I’m getting Cannot find module 'SOME DEPENDENCY' or its corresponding type declarations.ts(2307) for various dependencies which include typings in the dependency itself.
Example of one such dependency:
./node_modules/axios/index.d.ts
My project (among many other things) has:
./tsconfig.json
./src/SomeFileUsingAxios.tsx
./node_modules
./vendor/node_modules
./vendor/node_modules/axios
I’ve tried "typeRoots": ["./node_modules/@types", "./vendor/node_modules/@types"]
I’ve tried "rootDirs": ["./", "vendor/"]
I’ve tried both together ^
Can’t seem to make TypeScript aware of this dependency! Any ideas?