-
Hi. I am trying to compile some code in a workspace via typescript and I'm running into these minor errors. It seems that typescript cannot find the module 'prop-types' even though this is listed as a dependency by packages in the workspaces that need it and it is present inside my .caches folder. I'm wondering if anyone could explain what is happening here and what I can do to resolve these messages. This seems like a yarn 2 specific issue as yarn 1 did not run into these errors. .yarn/$$virtual/react-svg-virtual-cef9eff21d/0/cache/react-svg-npm-12.1.0-ee18b746f3-31636e51bc.zip/node_modules/react-svg/dist/ReactSVG.d.ts(1,28): error TS7016: Could not find a declaration file for module 'prop-types'. '/home/wfinch/work/dialsource1/dialsource/frontend/.yarn/cache/prop-types-npm-15.7.2-d7a04f2274-a440dd406c.zip/node_modules/prop-types/index.js' implicitly has an 'any' type. If the 'prop-types' package actually exposes this module, consider sending a pull request to amend 'https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/prop-types` |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
It's complaining about
|
Beta Was this translation helpful? Give feedback.
It's complaining about
Could not find a declaration file for module 'prop-types'
so that means it's after the types for the package, sinceprop-types
doesn't provide it's own that would be@types/prop-types
, so whatever depends onprop-types
lacks a dependency on@types/prop-types
as well. You can usepackageExtensions
to fix that.node_modules
* - Hoisting hides all kinds of undeclared dependency issues