无法安装反应导航({react native})

问题描述 投票:0回答:1

无法安装反应导航,错误如下,

   F:\Test2>npm install --save react-navigation
    npm WARN @babel/[email protected] requires a peer of @babel/[email protected] but none is installed. You must install peer dependencies yourself.
    npm WARN [email protected] requires a peer of [email protected] but none is installed. You must install peer dependencies yourself.
    npm WARN [email protected] requires a peer of react-native@^0.44.1 but none is installed. You must install peer dependencies yourself.
    npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
    npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Error: EPERM: operation not permitted, rename 'F:\Test2\node_modules\.staging\fsevents-db169078\node_modules\nopt' -> 'F:\Test2\node_modules\.staging\nopt-ec00ee2d'

    npm ERR! path F:\Test2\node_modules\hoist-non-react-statics
    npm ERR! code ENOENT
    npm ERR! errno -4058
    npm ERR! syscall rename
    npm ERR! enoent ENOENT: no such file or directory, rename 'F:\Test2\node_modules\hoist-non-react-statics' -> 'F:\Test2\node_modules\.hoist-non-react-statics.DELETE'
    npm ERR! enoent This is related to npm not being able to find a file.
    npm ERR! enoent

    npm ERR! A complete log of this run can be found in:
    npm ERR!     C:\Users\usman\AppData\Roaming\npm-cache\_logs\2018-09-13T04_40_04_090Z-debug.log

任何帮助,将不胜感激

react-native
1个回答
0
投票

似乎hoist-non-react-statics包不正确。所以你可以重新安装它或重新安装整个node_modules

首先,备份你的node_modules文件夹。这是非常重要的!然后删除node_modules文件夹并使用npm install重新安装npm软件包。

完成上述操作后,再次尝试安装react-navigation

© www.soinside.com 2019 - 2024. All rights reserved.