Amazon web services 代码构建&x2B;反应性+;Expo Web-此构建映像需要选择至少一个运行时版本
第一次尝试使用CodeBuild,从CodeCommit中提取数据。但是我的buildspec有问题。这是我目前掌握的代码:Amazon web services 代码构建&x2B;反应性+;Expo Web-此构建映像需要选择至少一个运行时版本,amazon-web-services,react-native,expo,aws-codebuild,expo-web,Amazon Web Services,React Native,Expo,Aws Codebuild,Expo Web,第一次尝试使用CodeBuild,从CodeCommit中提取数据。但是我的buildspec有问题。这是我目前掌握的代码: version: 0.2 phases: INSTALL: runtime-versions: nodejs: 10 commands: - npm install PRE_BUILD: commands: - npm install --q
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原生web项目适当调整它吗?我相信阶段名称区分大小写,所以将它们更改为
install
,pre_build
和build
完美,谢谢!我已从日志消息中复制。。。它是大写的,但在buildspec文件中确实需要小写!!