expo / turtle

Standalone app builder service
MIT License
384 stars 29 forks source link

turtle-cli build resulting in Error: Failed to build standalone app after node 16.13 #367

Closed trajano closed 2 years ago

trajano commented 2 years ago

New Issue Checklist

Issue Description

Just changed my node version to 16.13.0 from 14.18.1 and the android aab fails.

Command executed
turtle build:android \
          --keystore-path $(keystore.secureFilePath) \
          --keystore-alias $(keyAlias) \
          -t aab \
          --release-channel ${{ parameters.env }} \
          -o $(Build.ArtifactStagingDirectory)/app.aab
Complete output when running turtle, including the stack trace and command used
```txt 2021-12-09T01:31:27.1580801Z ##[section]Starting: aab 2021-12-09T01:31:27.1588247Z ============================================================================== 2021-12-09T01:31:27.1588599Z Task : Bash 2021-12-09T01:31:27.1588925Z Description : Run a Bash script on macOS, Linux, or Windows 2021-12-09T01:31:27.1589222Z Version : 3.189.0 2021-12-09T01:31:27.1589509Z Author : Microsoft Corporation 2021-12-09T01:31:27.1589884Z Help : https://docs.microsoft.com/azure/devops/pipelines/tasks/utility/bash 2021-12-09T01:31:27.1590316Z ============================================================================== 2021-12-09T01:31:28.1461555Z Generating script. 2021-12-09T01:31:28.1464455Z ========================== Starting Command Output =========================== 2021-12-09T01:31:28.1470561Z [command]/usr/bin/bash --noprofile --norc /home/vsts/work/_temp/85b7c84a-7b5a-43b2-812c-03a6ac942262.sh 2021-12-09T01:31:31.2916310Z Dec 9 01:31:31 turtle[3401] INFO: shell app for SDK 42.0.0 doesn't exist, downloading... 2021-12-09T01:31:31.2918054Z  platform: "android" 2021-12-09T01:31:31.2918938Z  buildPhase: "setting up environment" 2021-12-09T01:31:32.3648322Z Dec 9 01:31:32 turtle[3401] INFO: shell app has been downloaded 2021-12-09T01:31:32.3649155Z  platform: "android" 2021-12-09T01:31:32.3649764Z  buildPhase: "setting up environment" 2021-12-09T01:31:32.3667750Z Dec 9 01:31:32 turtle[3401] INFO: extracting shell app (this may take a while)... 2021-12-09T01:31:32.3669896Z  platform: "android" 2021-12-09T01:31:32.3670609Z  buildPhase: "setting up environment" 2021-12-09T01:32:57.9102411Z Dec 9 01:32:57 turtle[3401] INFO: shell app extracted 2021-12-09T01:32:57.9104389Z  platform: "android" 2021-12-09T01:32:57.9105646Z  buildPhase: "setting up environment" 2021-12-09T01:32:57.9108249Z Dec 9 01:32:57 turtle[3401] INFO: installing dependencies in /home/vsts/.turtle/workingdir/android/sdk42 directory... 2021-12-09T01:32:57.9109327Z  platform: "android" 2021-12-09T01:32:57.9110646Z  buildPhase: "setting up environment" 2021-12-09T01:32:58.2478412Z Dec 9 01:32:58 turtle[3401] INFO: yarn install v1.22.17 2021-12-09T01:32:58.2479650Z  platform: "android" 2021-12-09T01:32:58.2480541Z  buildPhase: "setting up environment" 2021-12-09T01:32:58.2481341Z  source: "stdout" 2021-12-09T01:32:58.2806759Z Dec 9 01:32:58 turtle[3401] INFO: info No lockfile found. 2021-12-09T01:32:58.2807997Z  platform: "android" 2021-12-09T01:32:58.2808883Z  buildPhase: "setting up environment" 2021-12-09T01:32:58.2809814Z  source: "stdout" 2021-12-09T01:32:58.4296763Z Dec 9 01:32:58 turtle[3401] INFO: [1/4] Resolving packages... 2021-12-09T01:32:58.4298135Z  platform: "android" 2021-12-09T01:32:58.4299020Z  buildPhase: "setting up environment" 2021-12-09T01:32:58.4299863Z  source: "stdout" 2021-12-09T01:32:58.6173972Z Dec 9 01:32:58 turtle[3401] INFO: error Couldn't find package "react-native" on the "npm" registry. 2021-12-09T01:32:58.6175479Z  platform: "android" 2021-12-09T01:32:58.6176556Z  buildPhase: "setting up environment" 2021-12-09T01:32:58.6177529Z  source: "stderr" 2021-12-09T01:32:58.6179012Z Dec 9 01:32:58 turtle[3401] INFO: info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command. 2021-12-09T01:32:58.6180288Z  platform: "android" 2021-12-09T01:32:58.6181316Z  buildPhase: "setting up environment" 2021-12-09T01:32:58.6182273Z  source: "stdout" 2021-12-09T01:32:58.6350163Z Dec 9 01:32:58 turtle[3401] ERROR: Failed to build standalone app 2021-12-09T01:32:58.6351092Z  err: Error: yarn exited with non-zero code: 1 2021-12-09T01:32:58.6352120Z  at ChildProcess.completionListener (/home/vsts/work/1/.nvm/versions/node/v16.13.0/lib/node_modules/turtle-cli/node_modules/@expo/spawn-async/src/spawnAsync.ts:65:13) 2021-12-09T01:32:58.6353353Z  at Object.onceWrapper (node:events:510:26) 2021-12-09T01:32:58.6354252Z  at ChildProcess.emit (node:events:390:28) 2021-12-09T01:32:58.6354927Z  at ChildProcess.emit (node:domain:475:12) 2021-12-09T01:32:58.6355642Z  at maybeClose (node:internal/child_process:1064:16) 2021-12-09T01:32:58.6356443Z  at Process.ChildProcess._handle.onexit (node:internal/child_process:301:5) 2021-12-09T01:32:58.6357060Z  ... 2021-12-09T01:32:58.6357896Z  at spawnAsync (/home/vsts/work/1/.nvm/versions/node/v16.13.0/lib/node_modules/turtle-cli/node_modules/@expo/spawn-async/src/spawnAsync.ts:26:19) 2021-12-09T01:32:58.6358839Z  at Object.spawnAsyncThrowError (/@expo/xdl@59.1.7/src/detach/ExponentTools.ts:111:19) 2021-12-09T01:32:58.6359816Z  at _installNodeModules (/home/vsts/work/1/.nvm/versions/node/v16.13.0/lib/node_modules/turtle-cli/src/bin/setup/android/index.ts:106:23) 2021-12-09T01:32:58.6360878Z  at _shellAppPostDownloadAction (/home/vsts/work/1/.nvm/versions/node/v16.13.0/lib/node_modules/turtle-cli/src/bin/setup/android/index.ts:91:5) 2021-12-09T01:32:58.6361946Z  at Object.ensureShellAppIsPresent (/home/vsts/work/1/.nvm/versions/node/v16.13.0/lib/node_modules/turtle-cli/src/bin/setup/utils/common.ts:40:5) 2021-12-09T01:32:58.6363020Z  at Object.setup [as default] (/home/vsts/work/1/.nvm/versions/node/v16.13.0/lib/node_modules/turtle-cli/src/bin/setup/android/index.ts:60:5) 2021-12-09T01:32:58.6364072Z  at Object.setup [as default] (/home/vsts/work/1/.nvm/versions/node/v16.13.0/lib/node_modules/turtle-cli/src/bin/setup/setup.ts:15:12) 2021-12-09T01:32:58.6365199Z  at /home/vsts/work/1/.nvm/versions/node/v16.13.0/lib/node_modules/turtle-cli/src/bin/utils/builder.ts:79:7 2021-12-09T01:32:58.6366165Z  at Command. (/home/vsts/work/1/.nvm/versions/node/v16.13.0/lib/node_modules/turtle-cli/src/bin/index.ts:23:12) 2021-12-09T01:32:58.6366913Z  platform: "android" 2021-12-09T01:32:58.6688160Z ##[error]Bash exited with code '1'. 2021-12-09T01:32:58.6725124Z ##[section]Finishing: aab ```

Environment

I am not using yarn in my app (there's only package-lock.json

``` Expo CLI 4.13.0 environment info: System: OS: Linux 5.11 Ubuntu 20.04.3 LTS (Focal Fossa) Shell: 5.0.17 - /bin/bash Binaries: Node: 16.13.0 - ~/work/1/.nvm/versions/node/v16.13.0/bin/node Yarn: 1.22.17 - /usr/local/bin/yarn npm: 8.1.0 - ~/work/1/.nvm/versions/node/v16.13.0/bin/npm SDKs: Android SDK: API Levels: 27, 28, 29, 30, 31 Build Tools: 27.0.0, 27.0.1, 27.0.2, 27.0.3, 28.0.0, 28.0.1, 28.0.2, 28.0.3, 29.0.0, 29.0.1, 29.0.2, 29.0.3, 30.0.0, 30.0.1, 30.0.2, 30.0.3, 31.0.0 Android NDK: 21.4.7075529 npmPackages: expo: ^42.0.0 => 42.0.4 react: 16.13.1 => 16.13.1 react-dom: 16.13.1 => 16.13.1 react-native: https://github.com/expo/react-native/archive/sdk-42.0.0.tar.gz => 0.63.2 react-native-web: ~0.13.12 => 0.13.18 npmGlobalPackages: expo-cli: 4.13.0 Expo Workflow: managed ```
brentvatne commented 2 years ago

Couldn't find package "react-native" on the "npm" registry

this looks like a problem with npm or possibly with a npm proxy that you're using

trajano commented 2 years ago

Appears to be a network connectivity issue. I just restarted an hour later and it worked again.