CodeBuild + ReactNative + Expo Web-此构建映像需要选择至少一个运行时版本

问题描述 投票:0回答:1

尝试首次使用CodeBuild,从CodeCommit中提取数据。但是我的buildspec遇到了问题。到目前为止,这是我的代码:

version: 0.2

phases:

    INSTALL:
        runtime-versions:
            nodejs: 10
        commands:
            - npm install


    PRE_BUILD:
      commands:
        - npm install --quiet --global expo-cli
        - >
          if [ -f yarn.lock ]; then
            yarn
          elif [ -f package-lock.json ] || [ -f npm-shrinkwrap.json ]; then
            npm ci
          else
            npm install
          fi
    BUILD:
      commands:
        - expo build:web

artifacts:
    baseDirectory: web-build
    files:
      - '**/*'
    name: 
        myname-$(date +%Y-%m-%d) 
cache:
    paths:
      - node_modules/**/*
      - $(npm root --global)/**/*

我已经为nodejs 10添加了运行时,它已停止触发此错误,但现在又开始了。有谁知道如何针对React-Native Web项目进行适当的调整?

amazon-web-services react-native expo aws-codebuild expo-web
1个回答
0
投票

我相信阶段名称区分大小写,因此请将其更改为installpre_buildbuild

© www.soinside.com 2019 - 2024. All rights reserved.