EmaSuriano / e2e-react-native-detox

Demo of react-native project using Detox
14 stars 14 forks source link

yarn fails with "node_modules/detox: Command failed." #5

Open The-Alchemist opened 3 years ago

The-Alchemist commented 3 years ago

yarn
yarn install v1.22.10
[1/4] πŸ”  Resolving packages...
[2/4] 🚚  Fetching packages...
[3/4] πŸ”—  Linking dependencies...
[4/4] πŸ”¨  Building fresh packages...
[-/4] β „ waiting...
[2/4] β „ fsevents
[4/4] β „ detox
error /Users/user/Development/e2e-react-native-detox/node_modules/detox: Command failed.
Exit code: 1
Command: node scripts/postinstall.js
Arguments:
Directory: /Users/user/Development/e2e-react-native-detox/node_modules/detox
Output:
+ xcodebuild -version
+++ dirname /Users/user/Development/e2e-react-native-detox/node_modules/detox/scripts/build_framework.ios.sh
++ dirname /Users/user/Development/e2e-react-native-detox/node_modules/detox/scripts
+ detoxRootPath=/Users/user/Development/e2e-react-native-detox/node_modules/detox
++ node -p 'require('\''/Users/user/Development/e2e-react-native-detox/node_modules/detox/package.json'\'').version'
+ detoxVersion=14.3.1
++ echo 14.3.1
++ xcodebuild -version
++ shasum
++ awk '{print $1}'
+ sha1=3487937f3a08e5f6b4d399ad5fb2ef4eca9f774c
+ detoxFrameworkDirPath=/Users/user/Library/Detox/ios/3487937f3a08e5f6b4d399ad5fb2ef4eca9f774c
+ detoxFrameworkPath=/Users/user/Library/Detox/ios/3487937f3a08e5f6b4d399ad5fb2ef4eca9f774c/Detox.framework
+ main
+ '[' -d /Users/user/Library/Detox/ios/3487937f3a08e5f6b4d399ad5fb2ef4eca9f774c ']'
+ '[' '!' -d /Users/user/Library/Detox/ios/3487937f3a08e5f6b4d399ad5fb2ef4eca9f774c/Detox.framework ']'
+ echo '/Users/user/Library/Detox/ios/3487937f3a08e5f6b4d399ad5fb2ef4eca9f774c was found, but could not find Detox.framework inside it. This means that the Detox framework build process was interrupted.
         deleting /Users/user/Library/Detox/ios/3487937f3a08e5f6b4d399ad5fb2ef4eca9f774c and trying to rebuild.'
+ rm -rf /Users/user/Library/Detox/ios/3487937f3a08e5f6b4d399ad5fb2ef4eca9f774c
/Users/user/Library/Detox/ios/3487937f3a08e5f6b4d399ad5fb2ef4eca9f774c was found, but could not find Detox.framework inside it. This means that the Detox framework build process was interrupted.
         deleting /Users/user/Library/Detox/ios/3487937f3a08e5f6b4d399ad5fb2ef4eca9f774c and trying to rebuild.
+ prepareAndBuildFramework
+ '[' -d /Users/user/Development/e2e-react-native-detox/node_modules/detox/ios ']'
+ detoxSourcePath=/Users/user/Development/e2e-react-native-detox/node_modules/detox/ios_src
+ extractSources /Users/user/Development/e2e-react-native-detox/node_modules/detox/ios_src
+ detoxSourcePath=/Users/user/Development/e2e-react-native-detox/node_modules/detox/ios_src
+ echo 'Extracting Detox sources...'
Extracting Detox sources...
+ mkdir -p /Users/user/Development/e2e-react-native-detox/node_modules/detox/ios_src
+ tar -xjf /Users/user/Development/e2e-react-native-detox/node_modules/detox/Detox-ios-src.tbz -C /Users/user/Development/e2e-react-native-detox/node_modules/detox/ios_src
+ buildFramework /Users/user/Development/e2e-react-native-detox/node_modules/detox/ios_src
+ detoxSourcePath=/Users/user/Development/e2e-react-native-detox/node_modules/detox/ios_src
+ echo 'Building Detox.framework from /Users/user/Development/e2e-react-native-detox/node_modules/detox/ios_src...'
Building Detox.framework from /Users/user/Development/e2e-react-native-detox/node_modules/detox/ios_src...
+ mkdir -p /Users/user/Library/Detox/ios/3487937f3a08e5f6b4d399ad5fb2ef4eca9f774c
+ /Users/user/Development/e2e-react-native-detox/node_modules/detox/scripts/build_universal_framework.sh /Users/user/Development/e2e-react-native-detox/node_modules/detox/ios_src/Detox.xcodeproj /Users/user/Library/Detox/ios/3487937f3a08e5f6b4d399ad5fb2ef4eca9f774c
node:child_process:702
    throw err;
    ^

Error: Command failed: /Users/user/Development/e2e-react-native-detox/node_modules/detox/scripts/build_framework.ios.sh
    at checkExecSyncError (node:child_process:680:11)
    at Object.execFileSync (node:child_process:699:15)
    at Object.<anonymous> (/Users/user/Development/e2e-react-native-detox/node_modules/detox/scripts/postinstall.js:2:27)
    at Module._compile (node:internal/modules/cjs/loader:1108:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
    at Module.load (node:internal/modules/cjs/loader:973:32)
    at Function.Module._load (node:internal/modules/cjs/loader:813:14)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:76:12)
    at node:internal/main/run_main_module:17:47 {
  status: 65,
  signal: null,
  output: [ null, null, null ],
  pid: 48185,
  stdout: null,

`
ansonliao commented 3 years ago

Facing this problem as well, @EmaSuriano could you help to solve the problem? Thanks.