简体   繁体   中英

CodeBuild + ReactNative + Expo Web - This build image requires selecting at least one runtime version

Trying to use CodeBuild for the first time, pulling data from CodeCommit. But I'm having issues with my buildspec. This is the code I have on it so far:

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)/**/*

I have already added the runtime for nodejs 10, it had stopped to trigger this error, but now it kicked again. Does anyone know how to properly tweak it for React-Native web projects?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM