我无法从' RecordRTC‘导入recordrtc
我已经安装了节点模块,但当我尝试导入它时,收到以下错误:
Could not find a declaration file for module 'recordrtc'. '/Users/jnelson/Documents/GitHub/VidApp/node_modules/recordrtc/RecordRTC.js' implicitly has an 'any' type.
Try `npm install @types/recordrtc` if it exists or add a new declaration (.d.ts) file containing `declare module 'recordrtc';` TS7016我曾尝试在.d.ts文件中简单地将record rtc声明为any类型,但似乎没有什么帮助。我觉得这应该是一个常见的问题,要么是一个简单的解决方案,要么是有人为此制作了一个.d.ts文件?
我用react-ionic创建了这个应用。上面的错误消息来自我的桌面上的本地web浏览器
发布于 2020-04-03 21:32:19
尝试npm install @types/recordrtc --save
出现上述错误是因为您正在将TypeScript与React应用程序一起使用。
https://stackoverflow.com/questions/57666501
复制相似问题