React本机导航安装

h9vpoimq  于 2022-12-24  发布在  React
关注(0)|答案(3)|浏览(138)

下面是安装react原生导航时出现的错误。请帮助我解决这个问题:

npm install -- save react-navigation
npm ERR! code ENOENT
npm ERR! syscall rename
npm ERR! path E:\ReactNative\logwithfirebase\node_modules\@react-navigation\core\node_modules\react-is
npm ERR! dest E:\ReactNative\logwithfirebase\node_modules\@react-navigation\core\node_modules\.react-is.DELETE
npm ERR! errno -4058
npm ERR! enoent ENOENT: no such file or directory, rename 'E:\ReactNative\logwithfirebase\node_modules\@react-navigation\core\node_modules\react-is' -> 'E:\ReactNative\logwithfirebase\node_modules\@react-navigation\core\node_modules\.react-is.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\asadc\AppData\Roaming\npm-cache\_logs\2022-08-09T08_24_34_577Z-debug.log
5ssjco0h

5ssjco0h1#

以下是React Native Navigation的完整安装
通过以下命令安装React Navigation。npm install @react-navigation/native安装后,遵循以下步骤:

**1.**一米一米一

如果这不起作用,然后删除依赖@react-navigation/nativepackage.json
请删除您的node_modulespackage-lock.json
并再次遵循相同的过程。
谢谢!

lf5gs5x2

lf5gs5x22#

是否要运行此程序?npm install @react-navigation/native
参考:https://reactnavigation.org/docs/getting-started/

sigwle7e

sigwle7e3#

如果你在mac上工作,那可能就是原因。而且你应该跑

yarn add @react-navigation/native

相关问题