Pipeline использует размещенный на MS агент с macOS 15
Yaml (соответствующий раздел):
- script: |
echo "Running 'yarn prepareProject'..."
yarn prepareProject
displayName: 'Prepare Project (Custom Script)'
package.json (соответствующий раздел)
"prepareProject": "node installios.js",
installios.js
#!/usr/bin/env node
var packageJson = require('./package.json')
var execSync = require('child_process').execSync;
var path = require('path');
var fs = require('fs');
console.log('Installing npm dependencies');
execSync('yarn install', {stdio:[0,1,2]});
console.log('Adding .xcode.env');
const nodePath = execSync('command -v node', { encoding: 'utf-8' }).trim();
execSync(`echo export NODE_BINARY=${nodePath} > .xcode.env`, {stdio:[0,1,2], cwd:'ios'});
console.log('Installing pod dependencies');
execSync('pod update', {stdio:[0,1,2], cwd:'ios'});
Ошибка: (первый запуск)
Installing RCT-Folly (2024.01.01.00)
Error installing RCT-Folly
[!] /usr/local/bin/git clone https://github.com/facebook/folly.git /var/folders/6k/** --template= --single-branch --depth 1 --branch v2024.01.01.00
Cloning into '/var/folders/6k/**'...
fatal: unable to access 'https://github.com/facebook/folly.git/': Failed to connect to github.com port 443 after 75004 ms: Couldn't connect to server
[!] [Codegen] warn: using experimental new codegen integration
node:child_process:957
throw err;
^
Error: Command failed: pod update
at Function._load (node:internal/modules/cjs/loader
at TracingChannel.traceSync (node:diagnostics_channel:322:14) {
status: 1,
signal: null,
output: [ null, null, null ],
pid: 18091,
stdout: null,
stderr: null
}
Node.js v22.12.0
Ошибка: (второй запуск, кажется, не удалось загрузить другой пакет)
Installing FirebaseSessions (11.11.0)
[!] Error installing FirebaseSessions
[!] /usr/local/bin/git clone https://github.com/firebase/firebase-ios-sdk.git /var/folders/6k/** --template= --single-branch --depth 1 --branch CocoaPods-11.11.0
Cloning into '/var/folders/6k/**'...
fatal: unable to access 'https://github.com/firebase/firebase-ios-sdk.git/': Failed to connect to github.com port 443 after 75004 ms: Couldn't connect to server
[!] [Codegen] warn: using experimental new codegen integration
node:child_process:957
throw err;
^
Error: Command failed: pod update
at Object..js (node:internal/modules/cjs/loader
at Module.load (node:internal/modules/cjs/loader
at Function._load (node:internal/modules/cjs/loader
at TracingChannel.traceSync (node:diagnostics_channel:322:14) {
status: 1,
signal: null,
output: [ null, null, null ],
pid: 25493,
stdout: null,
stderr: null
}
Node.js v22.12.0
Подробнее здесь: https://stackoverflow.com/questions/798 ... kage-stage
Мобильная версия