Javascript Fullcalendar error moment properties.push不是函数

Javascript Fullcalendar error moment properties.push不是函数,javascript,jquery,reactjs,fullcalendar,momentjs,Javascript,Jquery,Reactjs,Fullcalendar,Momentjs,我遵循了fullcalendar的文档,用npm包加载代码。我已下载以下3个npm软件包: fullcalendar 3.10.0 时刻2.24.0 Jquery 3.3.1 我已经初始化了日历,但控制台moment.momentProperties.push中出现错误,这不是一个函数 按照这个回答,如果我使用CDN工作正常,但我想使用npm包模块 CDN脚本 <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/

我遵循了fullcalendar的文档,用npm包加载代码。我已下载以下3个npm软件包:

  • fullcalendar 3.10.0
  • 时刻2.24.0
  • Jquery 3.3.1
我已经初始化了日历,但控制台
moment.momentProperties.push中出现错误,这不是一个函数

按照这个回答,如果我使用CDN工作正常,但我想使用npm包模块

CDN脚本

<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.24.0/moment.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.10.0/fullcalendar.min.js"></script>


这是我的密码

import ....;
import moment from 'moment';
import $ from 'jquery';
import 'fullcalendar';

class CalendarEl extends React.PureComponent {
    componentDidMount() {
        $(`#calendar-1`).fullCalendar({
            header: {
                left: 'prev,next today',
                center: 'title',
                right: 'month,agendaWeek,agendaDay,listWeek',
            },
            themeSystem: 'bootstrap4',
            ....other opts
    }
    render() {
        return (
            <Row className="calendar-row">
                <Col>
                    <div id={`calendar-1`} />
                </Col>
            </Row>
        );
    }
}

export default CalendarEl;
导入。。。。;
从“力矩”中导入力矩;
从“jquery”导入美元;
导入“完整日历”;
CalendarEl类扩展了React.PureComponent{
componentDidMount(){
$(`calendar-1`).完整日历({
标题:{
左:“上一个,下一个今天”,
中心:'标题',
右图:“月、agendaWeek、agendaDay、listWeek”,
},
主题系统:“bootstrap4”,
……其他选择
}
render(){
返回(
);
}
}
导出默认日历;
有人可以帮助我,告诉我如何用npm软件包初始化完整的日历。我不明白为什么我用这3个软件包的同一个版本和CDN可以很好地工作


我也使用webpack,我不知道这是否相关

moment的版本正确吗?@DanOswalt是的,是moment的最新版本。在package.json中,我可以看到:“moment”:“^2.24.0”,哪个版本的CDN有效?可能fullcalendar需要一个较旧版本的api?另一个版本中的注释显示,他们使用2.0.0版本使其正常工作,因此可能尝试在包中显式设置。json@DanOswalt我在CDN中也使用相同的版本