Within my node_modules directory, there is a package that contains the following import statement: import { x } from 'node_modules/@types/openfin/_v2/main';
Unfortunately, I am receiving an error message stating "cannot find module 'node_modules/@types/openfin/_v2/main' or its corresponding type declarations".
Interestingly, what does work are both '../../../../../node_modules/@types/openfin/_v2/main' and 'openfin/_v2/main'. It seems like the latter path is more commonly used when paths are resolved correctly without explicitly mentioning node_modules/@types. However, since I do not have control over the npm package itself, changing it locally would only result in the node modules being reinstalled during the pipeline. Is there a way to solve this issue without modifying the package itself? Perhaps by unresolving a path? But, would doing so affect other packages that are currently functioning properly?
I would greatly appreciate any assistance with this dilemma! I have already gone through various resources, such as this https://github.com/microsoft/TypeScript/issues/50722