我是reactjs新手,我已经安装了npm install react-bootstrap-modal
当我将它与 var Modal = require('react-bootstrap-modal')
一起使用时,它给出了下面的错误,任何人都可以帮我解决这个问题吗?
Could not find a declaration file for module 'react-bootstrap-modal'. 'd:/wamp64/www/my-app/node_modules/react-bootstrap-modal/lib/Modal.js' implicitly has an 'any' type.Try `npm install @types/react-bootstrap-modal` if it exists or add a new declaration (.d.ts) file containing `declare module 'react-bootstrap-modal';` [7016]
Try `npm install @types/react-bootstrap-modal` if it exists or add a new declaration (.d.ts) file containing `declare module 'react-bootstrap-modal';` [7016]
最佳答案
没有为react-bootstrap-modal安装作用域类型定义 尝试安装它们:
npm install --save-dev @types/node
npm install --save @types/react-bootstrap
Typed version of packages are maintained by DefinitelyTyped, an open source community. (For Typescript 2.0+) https://github.com/DefinitelyTyped/DefinitelyTyped
关于reactjs - 在React js中出现错误: Could not find a declaration file for module 'react-bootstrap-modal' .,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54158852/