【问题标题】:`npm install` issues/failure with expo-cli and react-native-appexpo-cli 和 react-native-app 的“npm install”问题/失败
【发布时间】:2020-02-01 17:03:29
【问题描述】:

对于看似最基本的任务(设置 expo/react-native 项目),我确实需要一些帮助。我已经安装了expo-cli (v3.11.7)react-native (v2.0.1)watchman (v4.9.0)node (v12.14.1)。我一直按照教程进行操作,直到需要运行 expo start 为止,但出现以下错误:

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

谁能给点建议?

【问题讨论】:

    标签: macos react-native expo npm-install yarnpkg


    【解决方案1】:

    我已经设法解决了这个问题。我试图通过我的家庭网络进行安装,这显然有一些代理限制!不知道为什么。

    有人建议我再试一次,但已连接到另一个网络或我的移动热点。我试过了,它奏效了!问题解决了。因此,我想对于可能遇到相同问题的任何其他人,请尝试连接到另一个网络,看看是否有帮助。

    如果这失败了,那么我想查看代理配置并在那里进行更改可能会有所帮助。但我不建议您这样做,除非您确切地知道自己在做什么。

    【讨论】:

      猜你喜欢
      • 2020-03-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-02-23
      • 1970-01-01
      • 1970-01-01
      • 2017-09-27
      相关资源
      最近更新 更多