Is it possible to exclude global typings in installed dependencies?
I installed a local dependency. This also copied the node_modules folder of that dependency. This node_modules folder holds installed @types typings. These conflict with the @types typings installed for the main project.
Eg. project-path/node_modules/local-dependency/node_modules/@types/react
conflicts with project-path/node_modules/@types/react
.
Is it possible to make the typescript compiler ignore the typings in that local dependency?
Did you try to use an empty array for types
option?
{
"compilerOptions": {
...,
"types": []
}
}
This disables automatic inclusion of types.
See the TypeScript documentation for more details.
Alternatively, use "skipLibCheck": true
in the compiler options.
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