首次尝试运行React Native应用时获取“ UnhandledPromiseRejectionWarning:错误:EEXIST:文件已存在”

时间:2019-01-11 20:38:47

标签: android node.js reactjs react-native

我遵循了以下链接上的说明:https://facebook.github.io/react-native/docs/getting-started

我曾尝试在expo和android studio中设置我的第一个应用程序,但是无论尝试如何,我都会遇到相同的问题。我已经按照说明设置了所有依赖项,并进行了npm安装。我也已经尝试卸载/重新安装节点。

该错误表明文件已经存在,但是Appdata \ Local是一个文件夹。我不确定为什么启动该应用程序需要建立一个已经存在的目录。我还研究了UnhandledPromisRejectionWarning,但是由于我没有编写任何代码,所以我不想编辑与启动该应用程序相关的任何现有脚本。

这是我在cmd上收到的错误消息:

C:\PT_APP\PhysicalTherapyApp_local>react-native run-android
(node:9092) UnhandledPromiseRejectionWarning: Error: EEXIST: file already exists, mkdir 'C:\Users\Jane Doe\AppData\Local'
    at Object.mkdirSync (fs.js:753:3)
    at sync (C:\PT_APP\PhysicalTherapyApp_local\node_modules\mkdirp\index.js:71:13)
    at sync (C:\PT_APP\PhysicalTherapyApp_local\node_modules\mkdirp\index.js:77:24)
    at sync (C:\PT_APP\PhysicalTherapyApp_local\node_modules\mkdirp\index.js:78:17)
    at sync (C:\PT_APP\PhysicalTherapyApp_local\node_modules\mkdirp\index.js:78:17)
    at sync (C:\PT_APP\PhysicalTherapyApp_local\node_modules\mkdirp\index.js:78:17)
    at sync (C:\PT_APP\PhysicalTherapyApp_local\node_modules\mkdirp\index.js:78:17)
    at sync (C:\PT_APP\PhysicalTherapyApp_local\node_modules\mkdirp\index.js:78:17)
    at sync (C:\PT_APP\PhysicalTherapyApp_local\node_modules\mkdirp\index.js:78:17)
    at sync (C:\PT_APP\PhysicalTherapyApp_local\node_modules\mkdirp\index.js:78:17)
(node:9092) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:9092) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

0 个答案:

没有答案