Superagent和create-react-app错误,找不到模块

时间:2017-02-04 10:20:54

标签: reactjs superagent

我正在尝试将superagentcreate-react-app引导程序一起使用。我收到错误:

./src/ToDoApp.js出错 找不到模块:[CaseSensitivePathsPlugin] node_modules\superagent\lib\client.js与磁盘上的相应路径不匹配 - 文件不存在。

我正在导入模块:

import request from 'superagent';
import noCache from 'superagent-no-cache';

我在request.get

中使用了ComponentDidMount
componentDidMount(){
      request.get(this.apiUrl)
      .use(noCache)
      .end(function _requestCallback() {
          // this.setState({data:res.data});
          console.log('gotit');
      });
    }

有什么想法吗?

1 个答案:

答案 0 :(得分:-1)

编辑:

一个想法:安装两个模块的较新版本,然后重试