Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

window10系统创建项目下载template报错 #882

Open
lw20001210 opened this issue Sep 24, 2024 · 6 comments
Open

window10系统创建项目下载template报错 #882

lw20001210 opened this issue Sep 24, 2024 · 6 comments

Comments

@lw20001210
Copy link

请按以下格式提供问题的相关信息。

window10系统创建项目下载template报错

PS D:\newStart\ReactNative> npx @react-native-community/cli@latest init first

           ######                ######
         ###     ####        ####     ###
        ##          ###    ###          ##
        ##             ####             ##
        ##             ####             ##
        ##           ##    ##           ##
        ##         ###      ###         ##
         ##  ########################  ##
      ######    ###            ###    ######
  ###     ##    ##              ##    ##     ###      

## ### #### ### ##

#### ######## ####

### ########## ###

#### ######## ####

## ### #### ### ##

  ###     ##    ##              ##    ##     ###      
      ######    ###            ###    ######
         ##  ########################  ##
        ##           ##    ##           ##
        ##             ####             ##
        ##             ####             ##
        ##          ###    ###          ##
         ###     ####        ####     ###
           ######                ######


          Welcome to React Native 0.75.3!
          Welcome to React Native 0.75.3!
             Learn once, write anywhere

             Learn once, write anywhere

⠏ Downloading template

error An unexpected error occurred: Command failed with exit code 1: yarn add @react-native-community/[email protected]
⠏ Downloading template

error An unexpected error occurred: Command failed with exit code 1: yarn add @react-native-community/[email protected]
warning ........\package.json: No license field
warning ........\package.json: No license field
error Error: https://registry.npmmirror.com/@react-native-community%2ftemplate: tunneling socket could not be established, cause=getaddrinfo ENOTFOUND 10809
error Error: https://registry.npmmirror.com/@react-native-community%2ftemplate: tunneling socket could not be established, cause=getaddrinfo ENOTFOUND 10809
at ClientRequest.onError (C:\Users\Lw\AppData\Roaming\nvm\v18.16.1\node_modules\yarn\lib\cli.js:152360:17)
at ClientRequest.onError (C:\Users\Lw\AppData\Roaming\nvm\v18.16.1\node_modules\yarn\lib\cli.js:152360:17)
at Object.onceWrapper (node:events:628:26)
at Object.onceWrapper (node:events:628:26)
at ClientRequest.emit (node:events:513:28)
at ClientRequest.emit (node:events:513:28)
at Socket.socketErrorListener (node:_http_client:502:9)
at Socket.socketErrorListener (node:_http_client:502:9)
at Socket.emit (node:events:513:28)
at emitErrorNT (node:internal/streams/destroy:151:8)
at emitErrorCloseNT (node:internal/streams/destroy:116:3)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
yarn add v1.22.21
info No lockfile found.
[1/4] Resolving packages...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info There appears to be trouble with your network connection. Retrying...
info Visit https://yarnpkg.com/en/docs/cli/add for documentation about this command..

请描述完整的环境/版本信息

屏幕截图 2024-09-24 210943
屏幕截图 2024-09-24 211045

@sunnylqm
Copy link

tunneling socket could not be established, cause=getaddrinfo ENOTFOUND 10809
这应该是你的代理问题

@lw20001210
Copy link
Author

tunneling socket could not be established, cause=getaddrinfo ENOTFOUND 10809 这应该是你的代理问题

最后我是在https://reactnative.dev/这个官网用它的创建命令成功的,官方中文文档https://www.react-native.cn/的创建命令就一直报上面那个错,关代理或者换代理都报错

@sunnylqm
Copy link

sunnylqm commented Sep 25, 2024

它的创建命令是指什么?expo?expo是无法直接安装第三方原生模块的

@lw20001210
Copy link
Author

它的创建命令是指什么?expo?expo是无法直接安装第三方原生模块的

npx create-expo-app@latest

@sunnylqm
Copy link

expo不涉及原生环境,创建比较简单,但是是预编译的环境,预编译的不是国内常用的模块,国内常用的模块又不能直接安装,所以在中文网上不是首选

@ry-krystal
Copy link

加我,帮你解决问题,微信号Krystaless

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants