datadog-ci
datadog-ci copied to clipboard
Build failure when pulling deps
Bug description
After upgrading expo to SDK-49, it has become impossible to build the application, or at least on linux. The build passes on macOS instances.
[4/4] Building fresh packages...
warning Error running install script for optional dependency: "/builds/guyzmo/zaas-driver/node_modules/cpu-features: Command failed.
Exit code: 1
Command: node buildcheck.js > buildcheck.gypi && node-gyp rebuild
Arguments:
Directory: /builds/guyzmo/zaas-driver/node_modules/cpu-features
Output:
/builds/guyzmo/zaas-driver/node_modules/buildcheck/lib/index.js:115
throw new Error('Unable to detect compiler type');
^
Error: Unable to detect compiler type
at BuildEnvironment.getKind (/builds/guyzmo/zaas-driver/node_modules/buildcheck/lib/index.js:115:9)
at BuildEnvironment.tryCompile (/builds/guyzmo/zaas-driver/node_modules/buildcheck/lib/index.js:537:15)
at BuildEnvironment.checkHeader (/builds/guyzmo/zaas-driver/node_modules/buildcheck/lib/index.js:423:25)
at Object.<anonymous> (/builds/guyzmo/zaas-driver/node_modules/cpu-features/buildcheck.js:16:4)
at Module._compile (node:internal/modules/cjs/loader:[125](https://gitlab.com/guyzmo/zaas-driver/-/jobs/5525334153#L125)6:14)
at Module._extensions..js (node:internal/modules/cjs/loader:[131](https://gitlab.com/guyzmo/zaas-driver/-/jobs/5525334153#L131)0:10)
at Module.load (node:internal/modules/cjs/loader:1119:32)
at Module._load (node:internal/modules/cjs/loader:960:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:86:12)
at node:internal/main/run_main_module:23:47
Node.js v18.18.2"
info This module is OPTIONAL, you can safely ignore this error
info This package requires node-gyp, which is not currently installed. Yarn will attempt to automatically install it. If this fails, you can run "yarn global add node-gyp" to manually install it.
error An unexpected error occurred: "/builds/guyzmo/zaas-driver/node_modules/ssh2: Cannot read properties of undefined (reading 'getOption')".
info If you think this is a bug, please open a bug report with the information provided in "/usr/local/share/.config/yarn/global/yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
[1/4] Resolving packages...
warning Error running install script for optional dependency: "/builds/guyzmo/zaas-driver/node_modules/dtrace-provider: Failed to auto-install node-gyp. Please run \"yarn global add node-gyp\" manually. Error: \"Couldn't find any versions for \\\"node-gyp\\\" that matches \\\"latest\\\" in our cache (possible versions are \\\"\\\"). This is usually caused by a missing entry in the lockfile, running Yarn without the --offline flag may help fix this issue.\""
info This module is OPTIONAL, you can safely ignore this error
N.B.: on CI I run yarn --frozen-lockfile --prefer-offline
.
After uninstalling all datadog deps and reinstalling them, the gitlab-ci error above happened again, but the scripts passed for EAS android.
Describe what you expected
a successful build.
Steps to reproduce the issue
setup an expo project and add datadog related stuff:
yarn add expo-datadog @datadog/mobile-react-native @datadog/mobile-react-navigation
yarn add -D @datadog/datadog-ci
and then, on a linux machine (my CI), just run
yarn
I'm doing it on CI on linux.
Additional context
- container (ran by gitlab-ci) node:18-alpine
- node 18.18.2
- yarn 1.22.19
- @datadog/datadog-ci@^2.23.1
- expo-datadog@^49.0.1
- @datadog/mobile-react-native@^2.0.1
- @datadog/mobile-react-navigation@^2.0.1
Command
None