reactjs - 无法导入 react 大日历

标签 reactjs react-big-calendar

我正在尝试导入组件“react-big-calendar”:

import React from 'react';
import BigCalendar from 'react-big-calendar';
import moment from 'moment';`

could not find a declaration file for module react big calendar

我已经尝试过使用 npm @Types.. 但它没有用

最佳答案

您是否在使用私有(private)存储库或在您的系统和 npm 存储库之间使用代理存储库(以缓存模块),如果是,则在您的 .npmrc 文件中添加以下行,然后尝试检查它是否有效:-

@types:registry = "https://registry.npmjs.com"

关于reactjs - 无法导入 react 大日历,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53431176/

相关文章:

reactjs - Algolia - 关闭 Modal 时存储 RefinementList 值

css - 带有 Bootstrap 4.0 alpha 布局的 React-big-calendar 丑陋

javascript - 更改 react 大日历中的行样式

javascript - 无法将 Prop 从父组件传递到子组件

javascript - 如何知道何时导入包或将其粘贴到 index.html

reactjs - React 在 DOM 渲染时显示加载微调器

javascript - 如何在 react router dom 中将不存在的路由重定向到主页?

javascript - 未选择正确的开始和结束日期

javascript - react 大日历错误 : Invalid prop `slotStart` of type `date` supplied to `Popup` , 预期 `number`

javascript - react 大日历,点击事件时渲染组件