简体   繁体   English

ENOENT:在 react-native 项目中安装 react-navigation 时没有这样的文件或目录

[英]ENOENT: no such file or directory when installing react-navigation in react-native project

I'm getting a few errors while I'm installing react-navigation in my react native project with我在 React Native 项目中安装 react-navigation 时遇到一些错误

npm install @react-navigation/native 在此处输入图片说明 The installation goes halfway and stops for a couple minutes and puts this error out.安装进行到一半并停止几分钟并消除此错误。 Can someone please help me solve this problem有人可以帮我解决这个问题吗

The navigation.navigate('') is not working whenever I am trying to navigate a button to another screen.每当我尝试将按钮导航到另一个屏幕时, navigation.navigate('')都不起作用。 I feel like there is some problem with the navigation thing in general as almost the same thing happens when I try installing the dependencies of the navigation into the project with我觉得导航一般存在一些问题,因为当我尝试将导航的依赖项安装到项目中时,几乎会发生同样的事情

npm install react-native-reanimated react-native-gesture-handler react-native-screens react-native-safe-area-context @react-native-community/masked-view

I am just starting out so I don't have much idea what I'm doing wrong.我刚刚开始,所以我不太知道我做错了什么。 I keep digging and post here if I find the solution.如果我找到解决方案,我会继续挖掘并在这里发布。

java version "11.0.8" 2020-07-14 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.8+10-LTS)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.8+10-LTS, mixed mode)
Gradle 6.3

在此处输入图片说明

I was installing stuff while the server was running.我在服务器运行时安装东西。 Just stopping the server and installing again fixes it.只需停止服务器并再次安装即可修复它。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM