我已经开始使用 React Native 项目,之前是使用本机代码。
我想添加 Amazon Lex,因此请按照链接中的以下步骤操作
https://aws-amplify.github.io/docs/js/interactions https://aws-amplify.github.io/docs/js/interactions
下面是我的 App.js 文件
import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
export default function App() {
return (
<View style={styles.container}>
<Text>Open up App.js to start working on your app!</Text>
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
});
我刚刚设置了放大库并添加了 LEX 的交互,但当我尝试运行应用程序时开始出现以下错误。添加之前工作正常...一旦创建 Amplify 文件夹并开始后端错误......
(节点:26180)UnhandledPromiseRejectionWarning:错误:jest-haste-map:
Haste 模块命名冲突:模块名称重复:
myamplifyproject_cfnlambda_87887b9a 路径:
C:\Users\temp\Desktop\myAmplifyProject\amplify\backend\interactions\lex900662fd\src\package.json
与 碰撞
C:\Users\temp\Desktop\myAmplifyProject\amplify#current-cloud-backend\interactions\lex900662fd\src\package.json
该错误是由以下原因引起的hasteImpl
返回相同的名称
不同的文件。
在 setModule (C:\Users\temp\Desktop\myAmplifyProject\node_modules\jest-haste-map\build\index.js:569:17)
在workerReply (C:\Users\temp\Desktop\myAmplifyProject\node_modules\jest-haste-map\build\index.js:641:9)
在 processTicksAndRejections (内部/process/task_queues.js:93:5)
在 async Promise.all (索引 30)错误 18:24 (节点:26180) UnhandledPromiseRejectionWarning:未处理的承诺拒绝。这
错误是通过抛出异步函数内部而产生的
没有 catch 块,或者拒绝未处理的承诺
与.catch()。 (拒绝 ID:2)(节点:26180)[DEP0018]
DeprecationWarning:未处理的承诺拒绝已被弃用。在
未来,承诺拒绝未处理的将终止
具有非零退出代码的 Node.js 进程。 (节点:26180)
UnhandledPromiseRejectionWarning:错误:jest-haste-map:Haste 模块
命名冲突:重复的模块名称:
myamplifyproject_cfnlambda_87887b9a 路径:
C:\Users\temp\Desktop\myAmplifyProject\amplify\backend\interactions\lex900662fd\src\package.json
与 碰撞
C:\Users\temp\Desktop\myAmplifyProject\amplify#current-cloud-backend\interactions\lex900662fd\src\package.json
该错误是由以下原因引起的hasteImpl
返回相同的名称
不同的文件。
在 setModule (C:\Users\temp\Desktop\myAmplifyProject\node_modules\jest-haste-map\build\index.js:569:17)
在workerReply (C:\Users\temp\Desktop\myAmplifyProject\node_modules\jest-haste-map\build\index.js:641:9)
在 processTicksAndRejections (内部/process/task_queues.js:93:5)
在 async Promise.all (索引 30)(节点:26180) UnhandledPromiseRejectionWarning:未处理的承诺拒绝。这
错误是通过抛出异步函数内部而产生的
没有 catch 块,或者拒绝未处理的承诺
与.catch()。 (拒绝 ID:3)
我已经使用了所有最新版本的react-native。
我尝试了以下解决方案但不起作用如何使反应本机打包程序忽略某些目录 https://stackoverflow.com/questions/41813211/how-to-make-react-native-packager-ignore-certain-directories/41963217?noredirect=1#comment104046098_41963217
我只是按照步骤...我哪里出错了...遗漏了任何东西...
请帮助...这是我的第一个反应本机应用程序...我实际上迷路了