Error during install as of below.
All help and comments appreciated
Regards, /ben
sharp@0.24.1 install /opt/homebrew/lib/node_modules/turtle-cli/node_modules/sharp
(node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
info sharp Downloading https://github.com/lovell/sharp-libvips/releases/download/v8.9.0/libvips-8.9.0-darwin-arm64v8.tar.gz
ERR! sharp Prebuilt libvips 8.9.0 binaries are not yet available for darwin-arm64v8
info sharp Attempting to build from source via node-gyp but this may fail due to the above error
info sharp Please see sharp - High performance Node.js image processing for required dependencies
TOUCH Release/obj.target/libvips-cpp.stamp
CXX(target) Release/obj.target/sharp/src/common.o âŚ/src/common.cc:25:10: fatal error: âvips/vips8â file not found #include <vips/vips8> ^~~~~~~~~~~~
1 error generated.
make: *** [Release/obj.target/sharp/src/common.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/opt/homebrew/Cellar/node@14/14.17.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:376:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
gyp ERR! System Darwin 20.5.0
gyp ERR! command â/opt/homebrew/Cellar/node@14/14.17.0/bin/nodeâ â/opt/homebrew/Cellar/node@14/14.17.0/lib/node_odules/npm/node_modules/node-gyp/bin/node-gyp.jsâ ârebuildâ
gyp ERR! cwd /opt/homebrew/lib/node_modules/turtle-cli/node_modules/sharp
gyp ERR! node -v v14.17.0
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
npm WARN @pmmmwh/react-refresh-webpack-plugin@0.3.3 requires a peer of react-refresh@^0.8.2 but none is installed. You must install peer dependencies yourself.
npm WARN ajv-keywords@3.5.2 requires a peer of ajv@^6.9.1 but none is installed. You must install peer dependencies yourself.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sharp@0.24.1 install: (node install/libvips && node install/dll-copy && prebuild-install) || (node-gyp rebuild && node install/dll-copy)
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sharp@0.24.1 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/ben/.npm/_logs/2021-06-06T08_32_46_684Z-debug.log
Hey @ben.archer2691, it looks like this is related to prebuilts for M1 Macs. Let me route this internally to see what the best course of action is and weâll follow up here.
Jun 8 17:07:15 turtle[13175] INFO: Downloading Android SDK
platform: âandroidâ
buildPhase: âsetting up environmentâ
downloading [====================] 97% 0.3sJun 8 17:07:30 turtle[13175] INFO: Decompressing Android SDK
platform: âandroidâ
buildPhase: âsetting up environmentâ
Jun 8 17:07:32 turtle[13175] INFO: Configuring Android SDK, this may take a while
platform: âandroidâ
buildPhase: âsetting up environmentâ
Jun 8 17:08:54 turtle[13175] INFO: Warning: Failed to find package ndk;17.2.4988734
platform: âandroidâ
buildPhase: âsetting up environmentâ
source: âstderrâ
Jun 8 17:08:55 turtle[13175] ERROR: Failed to setup environment for android builds
err: Error: ./configureAndroidSdk.sh exited with non-zero code: 1
at ChildProcess.completionListener (/opt/homebrew/lib/node_modules/turtle-cli/node_modules/@expo/spawn-async/src/spawnAsync.ts:65:13)
at Object.onceWrapper (events.js:483:26)
at ChildProcess.emit (events.js:376:20)
at ChildProcess.emit (domain.js:470:12)
at maybeClose (internal/child_process.js:1055:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
âŚ
at spawnAsync (/opt/homebrew/lib/node_modules/turtle-cli/node_modules/@expo/spawn-async/src/spawnAsync.ts:26:19)
at Object.spawnAsyncThrowError (/@expo/xdl@59.1.0/src/detach/ExponentTools.ts:111:19)
at _configureSdk (/opt/homebrew/lib/node_modules/turtle-cli/src/bin/setup/android/sdk.ts:54:23)
at Object.ensureAndroidSDKIsPresent [as default] (/opt/homebrew/lib/node_modules/turtle-cli/src/bin/setup/android/sdk.ts:34:7)
at prepareAndroidEnv (/opt/homebrew/lib/node_modules/turtle-cli/src/bin/setup/android/index.ts:70:21)
at Object.setup [as default] (/opt/homebrew/lib/node_modules/turtle-cli/src/bin/setup/android/index.ts:58:3)
at Object.setup [as default] (/opt/homebrew/lib/node_modules/turtle-cli/src/bin/setup/setup.ts:15:12)
at setupAction (/opt/homebrew/lib/node_modules/turtle-cli/src/bin/commands/setup.ts:33:5)
at /opt/homebrew/lib/node_modules/turtle-cli/src/bin/commands/setup.ts:22:40
at Command. (/opt/homebrew/lib/node_modules/turtle-cli/src/bin/index.ts:23:12)
platform: âandroidâ
Iâll check tomorrow what android ndk have support for m1 mac and try to prepare new version, but Iâm not sure if itâs the last part necessary to support that architecture.
npm uninstall -g turtle-cli
npm i -g turtle-cli@0.21.9-alpha.2
Installs without issues (some warnings though, pls let me know if you need these)
turtle setup:android
Result
Jun 11 13:28:36 turtle[4410] INFO: Downloading Android SDK
platform: âandroidâ
buildPhase: âsetting up environmentâ
downloading [=================== ] 95% 0.7sJun 11 13:28:50 turtle[4410] INFO: Decompressing Android SDK
platform: âandroidâ
buildPhase: âsetting up environmentâ
Jun 11 13:28:52 turtle[4410] INFO: Configuring Android SDK, this may take a while
platform: âandroidâ
buildPhase: âsetting up environmentâ
Jun 11 13:30:14 turtle[4410] INFO: Warning: Failed to find package ndk;21.4.7075529
platform: âandroidâ
buildPhase: âsetting up environmentâ
source: âstderrâ
Jun 11 13:30:15 turtle[4410] ERROR: Failed to setup environment for android builds
err: Error: ./configureAndroidSdk.sh exited with non-zero code: 1
at ChildProcess.completionListener (/opt/homebrew/lib/node_modules/turtle-cli/node_modules/@expo/spawn-async/src/spawnAsync.ts:65:13)
at Object.onceWrapper (events.js:483:26)
at ChildProcess.emit (events.js:376:20)
at ChildProcess.emit (domain.js:470:12)
at maybeClose (internal/child_process.js:1055:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
âŚ
at spawnAsync (/opt/homebrew/lib/node_modules/turtle-cli/node_modules/@expo/spawn-async/src/spawnAsync.ts:26:19)
at Object.spawnAsyncThrowError (/@expo/xdl@59.1.0/src/detach/ExponentTools.ts:111:19)
at _configureSdk (/opt/homebrew/lib/node_modules/turtle-cli/src/bin/setup/android/sdk.ts:54:23)
at Object.ensureAndroidSDKIsPresent [as default] (/opt/homebrew/lib/node_modules/turtle-cli/src/bin/setup/android/sdk.ts:34:7)
at prepareAndroidEnv (/opt/homebrew/lib/node_modules/turtle-cli/src/bin/setup/android/index.ts:70:21)
at Object.setup [as default] (/opt/homebrew/lib/node_modules/turtle-cli/src/bin/setup/android/index.ts:58:3)
at Object.setup [as default] (/opt/homebrew/lib/node_modules/turtle-cli/src/bin/setup/setup.ts:15:12)
at setupAction (/opt/homebrew/lib/node_modules/turtle-cli/src/bin/commands/setup.ts:33:5)
at /opt/homebrew/lib/node_modules/turtle-cli/src/bin/commands/setup.ts:22:40
at Command. (/opt/homebrew/lib/node_modules/turtle-cli/src/bin/index.ts:23:12)
platform: âandroidâ
0.21.9-alpha.4 no ndk (binaries might be a bit bigger, but with aab it shouldnât matter)
make sure to delete ~/.turtle directory when switching between those versions
I hoped that upgrading ndk will work but it seems m1 support might require upgrade of android toolchain which significantly evolved since we last updated it. So if above solutions wonât solve that, a proper fix would require a lot of work.
Iâll take it up internally if we want to support it, but most likely decision will be no to do that. turtle-cli is going to be deprecated when we switch to EAS (few more sdks will still be supported), so we donât really want to work on that if itâs not critical issue (itâs not considered critical, because it should still work for you under rosetta).