Reputation: 1393
I have a Monorepo which uses Typescript. I have a common folder which shows this error on the top of the file -> Entry point for implicit type library 'glob'
. I am not sure what is wrong with the configuration.
Screenshot:
tsconfig.json
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"allowJs": true,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,
"isolatedModules": true,
"jsx": "react-native",
"lib": [
"es2021"
],
"moduleResolution": "node",
"noEmit": false,
"strict": true,
"target": "esnext",
"composite": true,
"rootDir": ".",
"outDir": "dist",
"declaration": true,
"emitDeclarationOnly": true,
"declarationMap": true
},
"exclude": [
"node_modules",
]
}
Any Suggestions?
Upvotes: 18
Views: 29804
Reputation: 145880
Remember that types are for npm projects that weren't written in Typescript.
So if the library is migrated to Typescript you can uninstall the types.
I just had the same issue with marked
in an Angular project. Marked is now written in Typescript so doesn't need @types.
npm uninstall @types/marked
A big clue this may have happened is if the version under @types differs greatly from the project itself.
Upvotes: 2
Reputation:
Include "types" in your "compilerOptions" ...
{
"compilerOptions": {
"types": [
// ... your other types
"node"
],
},
}
Upvotes: 21