macos - expo-cli 和 react-native-app 的“npm install”问题/失败
问题描述
我真的需要一些帮助,这似乎是最基本的任务(设置 expo/react-native 项目)。我已经安装了expo-cli (v3.11.7)
、react-native (v2.0.1)
和。我一直按照教程进行操作,直到需要运行 expo start 为止,但出现以下错误:watchman (v4.9.0)
node (v12.14.1)
Your project is in SDK version >= 33.0.0, but the expo package version seems to be older.
Error: node_modules directory is missing. Please run npm install in your project directory.
Couldn't start project. Please fix the errors and restart the project.
Set EXPO_DEBUG=true in your env to view the stack trace.
然后我运行npm install
并再次尝试,但弹出相同的错误。我已经删除了 node_modules 文件夹,但也没有用。
更新:
当我 npm install 这是我看到的错误:
npm WARN deprecated core-js@1.2.7: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
npm ERR! code EPROTO
npm ERR! errno EPROTO
npm ERR! request to https://codeload.github.com/expo/react-native/tar.gz/sdk-36.0.0 failed, reason: write EPROTO 4521895360:error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure:../deps/openssl/openssl/ssl/record/rec_layer_s3.c:1544:SSL alert number 40
我已经安装yarn (v1.21.1)
并尝试使用它进行安装,但出现相同的错误:
warning expo > fbemitter > fbjs > core-js@1.2.7: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
error An unexpected error occurred: "https://github.com/expo/react-native/archive/sdk-36.0.0.tar.gz: write EPROTO 4356277696:error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure:../deps/openssl/openssl/ssl/record/rec_layer_s3.c:1544:SSL alert number 40
任何人都可以建议吗?
解决方案
我已经设法解决了这个问题。我试图通过我的家庭网络进行安装,这显然有一些代理限制!不知道为什么。
有人建议我再试一次,但连接到另一个网络或我的移动热点。我试过了,它奏效了!问题解决了。因此,我想对于可能遇到相同问题的任何其他人,请尝试连接到另一个网络,看看是否有帮助。
如果这失败了,那么我想查看代理配置并在那里进行更改可能会有所帮助。但除非您确切知道自己在做什么,否则我不建议您这样做。
推荐阅读
- r - 在 RMarkdown 中显示可变长度的输出
- php - WORDPRESS:将自定义帖子类型删除同步到 wordpress 帐户
- php - 在 PHP 中显示最近从远程 FTP 服务器上传的图像
- laravel - Laravel Vue.Js中外键为空时的关系错误
- python - 程序在给定的数字中找到一个不同的均匀度,并返回这个数字的位置
- php - 有条件地加载公共和管理代码,AJAX 在 WordPress 的两边都工作
- ruby-on-rails - 我应该使用 Rails 来保持一致性吗?(对于 ETL 项目)
- php - Vue + Laravel 不发送电子邮件 - 没有收到任何错误
- reactjs - React Hooks - 如何使用useEffect之外的变量声明来定位元素子(使用useRef)?
- java - 在 Visual Studio Code 中禁用带有类名的注释