Reactjs Typescript错误:找不到模块';反应dnd';

Reactjs Typescript错误:找不到模块';反应dnd';,reactjs,typescript,create-react-app,react-dnd,Reactjs,Typescript,Create React App,React Dnd,我当前在导入react dnd时遇到此错误: Could not find a declaration file for module 'react-dnd'. 'node_modules/react-dnd/lib/index.js' implicitly has an 'any' type. Try `npm install @types/react-dnd` if it exists or add a new declaration (.d.ts) file containing `dec

我当前在导入
react dnd
时遇到此错误:

Could not find a declaration file for module 'react-dnd'. 'node_modules/react-dnd/lib/index.js' implicitly has an 'any' type.
Try `npm install @types/react-dnd` if it exists or add a new declaration (.d.ts) file containing `declare module 'react-dnd';
react dnd
不提供类型定义吗?我还需要做些什么才能访问这些类型


我在严格模式下使用typescript。我的应用程序是用create-react-app构建的。

react-dnd
确实附带了类型定义,如中所示。您不需要做任何事情来访问这些类型。可能您使用的是旧版本的react dnd,其中没有包含类型?

react dnd
确实附带了类型定义,如中所示。您不需要做任何事情来访问这些类型。也许您使用的是旧版本的react dnd,但没有包含这些类型?

谢谢,我使用的是2.6版而不是11.1版!我从github克隆了一个非常老的示例…谢谢,我使用的是2.6版而不是11.1版!我从github克隆了一个非常古老的示例。。。