Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Unsupported platform: aarch64-linux-android #1421

Closed
secext2022 opened this issue Jul 8, 2023 · 4 comments
Closed

Error: Unsupported platform: aarch64-linux-android #1421

secext2022 opened this issue Jul 8, 2023 · 4 comments

Comments

@secext2022
Copy link

I run deno 1.35.0 for aarch64-linux-android (adb shell): denoland/deno#19759

violet:/data/local/tmp/deno-test/5 $ ./deno --version
deno 1.35.0 (release, aarch64-linux-android)
v8 11.6.189.7
typescript 5.1.6

Fresh can create a project but can not run:

violet:/data/local/tmp/deno-test/5 $ export HOME=$(pwd)
violet:/data/local/tmp/deno-test/5 $ export PATH=$(pwd):$PATH
violet:/data/local/tmp/deno-test/5 $ deno run -A -r https://fresh.deno.dev

  🍋 Fresh: the next-gen web framework.  

Project Name [fresh-project] 
Let's set up your new Fresh project.

Fresh has built in support for styling using Tailwind CSS. Do you want to use this? [y/N] y
Do you use VS Code? [y/N] n
The manifest has been generated for 3 routes and 1 islands.

Project initialized!

Enter your project directory using cd fresh-project.
Run deno task start to start the project. CTRL-C to stop.

Stuck? Join our Discord https://discord.gg/deno 

Happy hacking! 🦕
violet:/data/local/tmp/deno-test/5 $ cd fresh-project/
violet:/data/local/tmp/deno-test/5/fresh-project $ ls -l
total 36
-rw-rw-rw- 1 shell shell  363 2023-07-08 11:33 README.md
drwxrwxrwx 2 shell shell 3488 2023-07-08 11:33 components
-rw-rw-rw- 1 shell shell  767 2023-07-08 11:33 deno.json
-rwxrwxrwx 1 shell shell  130 2023-07-08 11:33 dev.ts
-rw-rw-rw- 1 shell shell  604 2023-07-08 11:33 fresh.gen.ts
drwxrwxrwx 2 shell shell 3488 2023-07-08 11:33 islands
-rw-rw-rw- 1 shell shell  454 2023-07-08 11:33 main.ts
drwxrwxrwx 3 shell shell 3488 2023-07-08 11:33 routes
drwxrwxrwx 2 shell shell 3488 2023-07-08 11:33 static
-rw-rw-rw- 1 shell shell  111 2023-07-08 11:33 twind.config.ts
violet:/data/local/tmp/deno-test/5/fresh-project $ deno task start
Task start deno run -A --watch=static/,routes/ dev.ts
Watcher Process started.
The manifest has been generated for 3 routes and 1 islands.

 🍋 Fresh ready 
    Local: http://localhost:8000/

An error occurred during route handling or page rendering. Error: Unsupported platform: aarch64-linux-android
    at install (https://deno.land/x/[email protected]/mod.js:1843:11)
    at https://deno.land/x/[email protected]/mod.js:1852:29
    at ensureServiceIsRunning (https://deno.land/x/[email protected]/mod.js:1975:7)
    at Module.initialize (https://deno.land/x/[email protected]/mod.js:1743:9)
    at initEsbuild (https://deno.land/x/[email protected]/src/build/esbuild.ts:120:19)
    at EsbuildBuilder.build (https://deno.land/x/[email protected]/src/build/esbuild.ts:40:13)
    at ServerContext.#buildSnapshot (https://deno.land/x/[email protected]/src/server/context.ts:402:31)
    at Object.default (https://deno.land/x/[email protected]/src/server/context.ts:772:49)
    at handler (https://deno.land/x/[email protected]/src/server/router.ts:177:34)
    at Object.next (https://deno.land/x/[email protected]/src/server/context.ts:436:34)

esbuild has support for arm64 android: https://www.npmjs.com/package/@esbuild/android-arm64

@secext2022
Copy link
Author

The current workaround of this problem is to manually download esbuild binary:

> wget "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.17.19.tgz"
> tar -xvf android-arm64-0.17.19.tgz
> cd package/bin
> adb push esbuild /data/local/tmp/deno-test/5
esbuild: 1 file pushed, 0 skipped. 53.3 MB/s (9371648 bytes in 0.168s)
> adb shell
violet:/ $ cd /data/local/tmp/deno-test/5
violet:/data/local/tmp/deno-test/5 $ export HOME=$(pwd)
violet:/data/local/tmp/deno-test/5 $ export PATH=$(pwd):$PATH
violet:/data/local/tmp/deno-test/5 $ esbuild --version
0.17.19
violet:/data/local/tmp/deno-test/5 $ export ESBUILD_BINARY_PATH=$(pwd)/esbuild
violet:/data/local/tmp/deno-test/5 $ cd fresh-project/
violet:/data/local/tmp/deno-test/5/fresh-project $ deno task start
Task start deno run -A --watch=static/,routes/ dev.ts
Watcher Process started.
The manifest has been generated for 3 routes and 1 islands.

 🍋 Fresh ready 
    Local: http://localhost:8000/

Now it works well on Android.

@secext2022
Copy link
Author

The PR has been merged: evanw/esbuild#3217

so this will fix after upgrade to new version of esbuild :-)

@marvinhagemeister
Copy link
Collaborator

Resolved by #1841

@lzif
Copy link

lzif commented Jan 28, 2024

I have the shame issues:(

 < ~/deno/fresh > -> deno task start
Task start deno run -A --watch=static/,routes/ dev.ts
Watcher Process started.
The manifest has been generated for 5 routes and 1 islands.

 🍋 Fresh ready
    Local: http://localhost:8000/

An error occurred during route handling or page rendering.
Error: Unsupported platform: aarch64-alpine-linux-musl
    at install (https://deno.land/x/[email protected]/mod.js:1878:11)
    at https://deno.land/x/[email protected]/mod.js:1887:29
    at ensureServiceIsRunning (https://deno.land/x/[email protected]/mod.js:2010:7)
    at Module.initialize (https://deno.land/x/[email protected]/mod.js:1777:9)
    at EsbuildBuilder.build (https://deno.land/x/[email protected]/src/build/esbuild.ts:54:21)
    at async ServerContext.buildSnapshot (https://deno.land/x/[email protected]/src/server/context.ts:304:26)
    at async ServerContext.#bundleAssetRoute (https://deno.land/x/[email protected]/src/server/context.ts:637:22)
    at async handler (https://deno.land/x/[email protected]/src/server/context.ts:288:14)
    at async ext:deno_http/00_serve.js:448:1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants