【发布时间】: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