【问题标题】:Can't build expro project无法构建 expro 项目
【发布时间】:2021-09-11 06:07:40
【问题描述】:

我想使用 expo 创建 react native 项目 但是失败了....有人知道如何解决吗???

request to https://registry.npmjs.org/expo-template-blank failed, reason: connect ETIMEDOUT 104.16.16.35:443

但使用 react-native-cli 对我有用,不适用于 expo...

展会初始化应用

Choose a template: » blank               a minimal app as clean as an empty canvas
request to https://registry.npmjs.org/expo-template-blank failed, reason: connect ETIMEDOUT 104.16.19.35:443
        
FetchError: request to https://registry.npmjs.org/expo-template-blank failed, reason: connect ETIMEDOUT 104.16.19.35:443
            at ClientRequest.<anonymous> (C:\Users\Me\AppData\Roaming\npm\node_modules\expo-cli\node_modules\minipass-fetch\lib\index.js:97:14)
            at ClientRequest.emit (events.js:315:20)
            at TLSSocket.socketErrorListener (_http_client.js:469:9)
            at TLSSocket.emit (events.js:327:22)
            at emitErrorNT (internal/streams/destroy.js:106:8)
            at emitErrorCloseNT (internal/streams/destroy.js:74:3)
            at processTicksAndRejections (internal/process/task_queues.js:80:21)

【问题讨论】:

标签: react-native frontend expo


【解决方案1】:

最后,我不知道运行“expo init app”来创建项目......

所以,我去https://snack.expo.io/ 创建并下载项目。

然后转到项目的根目录。 然后使用这些命令:

npm install -g expo-cli
npm install
expo start

效果很好!

【讨论】:

    猜你喜欢
    • 2020-11-29
    • 2021-06-10
    • 2021-11-21
    • 2021-05-25
    • 2019-07-01
    • 1970-01-01
    • 2015-12-05
    • 2014-05-21
    • 2016-01-16
    相关资源
    最近更新 更多