【问题标题】:Multiple modules with names that only differ in casing when following guide遵循指南时名称仅在大小写上有所不同的多个模块
【发布时间】:2020-10-16 16:18:25
【问题描述】:

尝试使用以下指南使用 AWS amplify 设置基本反应项目:AWS Setup

在最底部,它告诉您将以下代码复制并粘贴到索引文件中最后一次导入的下方。

import Amplify from "aws-amplify";
import awsExports from "./aws-exports";
Amplify.configure(awsExports);

这样做使我的 react 项目不会出现以下错误:

There are multiple modules with names that only differ in casing.
This can lead to unexpected behavior when compiling on a filesystem with other case-semantic.
Use equal casing. Compare these module identifiers:
* D:\Documents\Code\etutorr\node_modules\babel-loader\lib\index.js??ref--6-oneOf-2!D:\Documents\Code\eTutorr\node_modules\webpack\buildin\module.js
    Used by 3 module(s), i. e.
    D:\Documents\Code\etutorr\node_modules\babel-loader\lib\index.js??ref--6-oneOf-2!D:\Documents\Code\eTutorr\node_modules\lodash\_nodeUtil.js
* D:\Documents\Code\etutorr\node_modules\babel-loader\lib\index.js??ref--6-oneOf-2!D:\Documents\Code\etutorr\node_modules\webpack\buildin\module.js
    Used by 2 module(s), i. e.
    D:\Documents\Code\etutorr\node_modules\babel-loader\lib\index.js??ref--6-oneOf-2!D:\Documents\Code\etutorr\node_modules\node-libs-browser\node_modules\punycode\punycode.js

我已经四处寻找解决方案,但我在网上找到的大多数都告诉我检查我的导入大小写,但由于我直接从文档中获取它,所以我认为它是正确的。

已尝试删除 node_modules 然后运行 ​​npm install。

【问题讨论】:

  • 有趣的是,现在已经 4 年多了,仍然是个问题,现在正在查找,还没有任何线索。

标签: node.js reactjs amazon-web-services webpack aws-amplify


【解决方案1】:

将根文件夹名称更改为小写字母即可。

例如:将 Document 文件夹重命名为“document”,将 Code 重命名为“code”

【讨论】:

    猜你喜欢
    • 2017-06-18
    • 2021-05-14
    • 1970-01-01
    • 2019-09-03
    • 2018-12-16
    • 2018-01-08
    • 2018-05-12
    • 1970-01-01
    • 2020-04-16
    相关资源
    最近更新 更多