我尝试安装弹出对话框以响应本机

时间:2019-05-12 10:55:45

标签: react-native react-native-android

我尝试为react-native安装popup-dialog,但出现错误


    npm ERR! path C:\Users\Zarzu Victor\Application\node_modules\react-native-safe-ar
    ea-view
    npm ERR! code EISGIT
    npm ERR! git C:\Users\Zarzu Victor\Application\node_modules\react-native-safe-are
    a-view: Appears to be a git repo or submodule.
    npm ERR! git     C:\Users\Zarzu Victor\Application\node_modules\react-native-safe
    -area-view
    npm ERR! git Refusing to remove it. Update manually,
    npm ERR! git or move it out of the way first.

    npm ERR! A complete log of this run can be found in:
    npm ERR!     C:\Users\Zarzu Victor\AppData\Roaming\npm-cache\_logs\2019-05-12T10_
    50_31_386Z-debug.log

1 个答案:

答案 0 :(得分:1)

此问题通常有时会发生,作为临时解决方法,请按照以下步骤操作:

1)删除node_modules目录中的此文件夹

C:\Users\Zarzu Victor\Application\node_modules\react-native-safe
    -area-view

2)安装您要再次添加的软件包。

npm i popup-dialog --save

那应该解决问题。希望对您有帮助:)