When importing compromise, I see this error:
import nlp from 'compromise';
Could not find a declaration file for module 'compromise'. '$project/node_modules/compromise/src/three.js' implicitly has an 'any' type.
There are types at '$project/node_modules/compromise/types/three.d.ts', but this result could not be resolved when respecting package.json "exports". The 'compromise' library may need to update its package.json or typings.ts(7016)
I've not seen this strategy of separating src and types into separate folders like this, I think that's where the issue might be?
tsconfig.json:
{
"compilerOptions": {
"target": "ES2022",
"lib": ["ES2022","DOM"],
"module": "nodenext"
}
}
Setting moduleResolution to bundler does not seem to help, nor does setting module to Node16 or ESNext or others.
When importing
compromise, I see this error:I've not seen this strategy of separating
srcandtypesinto separate folders like this, I think that's where the issue might be?tsconfig.json:{ "compilerOptions": { "target": "ES2022", "lib": ["ES2022","DOM"], "module": "nodenext" } }Setting
moduleResolutiontobundlerdoes not seem to help, nor does setting module toNode16orESNextor others.