Closed BanDroid closed 9 months ago
fyi: i use pnpm, i also try with npm and yarn too, result was the same.
Is Disabled SWC as replacement for Babel because of custom Babel configuration
printed?
Is
Disabled SWC as replacement for Babel because of custom Babel configuration
printed?
no, that was the weird part, usually i see this
Does it crash? Please post the whole error message
Does it crash? Please post the whole error message
yes, it does crash.
> next-swc-android-issue@0.1.0 dev /data/data/com.termux/files/home/Projects/NextJS/
> next dev
â–² Next.js 14.0.0
- Local: http://localhost:3000
âš Trying to load next-swc for target triple [object Object], but this target is not supported
⨯ Failed to load SWC binary for android/arm64, see more info here: https://nextjs.org/docs/messages/failed-loading-swc
i want to use android/arm64 too
i want to use android/arm64 too
use Next v13 for now, we cant use v14 yet.
I can reproduce this in termux.
We've reintroduced WASM fallback for SWC (and enabled it by default in web containers).
@jridgewell fix confirmed. 🚀 🎉
Hoe to use that?
@jujutsucode how to use what ?
The wasm
Pada Jum, 10 Nov 2023 11.09, Muhammad Tsany Qudsi @.***> menulis:
@jujutsucode https://github.com/jujutsucode how to use what ?
— Reply to this email directly, view it on GitHub https://github.com/vercel/next.js/issues/57608#issuecomment-1805056260, or unsubscribe https://github.com/notifications/unsubscribe-auth/BA6IEYQLQABKQQ24FCNPY4LYDWSGNAVCNFSM6AAAAAA6S6VVI6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMBVGA2TMMRWGA . You are receiving this because you were mentioned.Message ID: <vercel/next .@.***>
@jujutsucode can you clarify your question ? This issue is about NextJS 14 can't be installed in Termux because of SWC issues. Is that your issue as well ?
@jridgewell it still occuring in termux android, already have .babelrc with next/babel
as presets, and also set swcMinify to false in next.config.js.
running dev server still trying to load swc binary.
here's new log
> test-2@0.1.0 dev /data/data/com.termux/files/home/Projects/NextJS/test-2
> next dev
â–² Next.js 14.0.2
- Local: http://localhost:12345
âš Disabling SWC Minifer will not be an option in the next major version. Please report any issues you may be experiencing to https://github.com/vercel/next.js/issues
âš Attempted to load @next/swc-android-arm64, but it was not installed
⨯ Failed to load SWC binary for android/arm64, see more info here: https://nextjs.org/docs/messages/failed-loading-swc
Enable experimental: { useWasmBinary: true }
in your next.config.js
Enable
experimental: { useWasmBinary: true }
in yournext.config.js
alright, will test it and send the result
Enable
experimental: { useWasmBinary: true }
in yournext.config.js
still crashing, now it even worse, no logs about the crash or error, just stopped immedietly.
~/.../NextJS/test-2 $ pnpm run dev
> test-2@0.1.0 dev /data/data/com.termux/files/home/Projects/NextJS/test-2 > next dev
â–² Next.js 14.0.2
- Local: http://localhost:3000
~/.../NextJS/test-2 $
I'm afraid I don't have an Android device to debug this.
I'm afraid I don't have an Android device to debug this.
do nextjs have log level for debugging crash? more verbose message would be needed.
could you use emulator and install termux so you could reproduce it?
I'm afraid I don't have an Android device to debug this.
do nextjs have log level for debugging crash? more verbose message would be needed.
could you use emulator and install termux so you could reproduce it?
I think its because the package version is stopped at 13 https://www.npmjs.com/package/@next/swc-android-arm64
I'm afraid I don't have an Android device to debug this.
do nextjs have log level for debugging crash? more verbose message would be needed.
could you use emulator and install termux so you could reproduce it?
This is the log at first npm run dev
after create next app (sorry i cant upload image here)
https://raw.githubusercontent.com/GorenganHunter/static/main/Screenshot_20231117-092131_Termux.png
@jridgewell @next/swc-wasm-nodejs is not in sync with nextjs anymore, so we can't even run Next.js 14 in WebContainer
https://www.npmjs.com/package/@next/swc-wasm-nodejs
Enable
experimental: { useWasmBinary: true }
in yournext.config.js
Enable
experimental: { useWasmBinary: true }
in yournext.config.js
Not closed fakk!! Still error
@jridgewell fix confirmed. 🚀 🎉
retracted.. it was a fluke 😢 sorry for the false confirmation
When the problem is fixed, I want to program in termux on nextjs 14 🥺
update: i successfully run next 14.0.4 in termux, the requirements are here:
i have verified my own solution, so if anyone got this working too, notified me so i could close the issue.
update: i successfully run next 14.0.4 in termux, the requirements are here:
* proot (i tried with debian 10 buster from Andronix) * arm64 device * node >= v18.17
i have verified my own solution, so if anyone got this working too, notified me so i could close the issue.
Yes it's fixed in https://github.com/vercel/next.js/commit/bb25edfdd4964994176085f26a9f38434ad66b58 I think we can close this ticket now
Yes it's fixed in https://github.com/vercel/next.js/commit/bb25edfdd4964994176085f26a9f38434ad66b58 I think we can close this ticket now
it was not because it was fixed, i found a workaround to make this work. arm64 device would work like a charm, but it still doesn't work for any 32bit device or 32bit mode on 64bit (armv8l).
but yeah, i'll close this issue then.
This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
Link to the code that reproduces this issue
https://github.com/BanDroid/next-swc-android-issue
To Reproduce
create-next-app
in termux..babelrc
/babel.config.js
and use presets "next/babel".Current vs. Expected behavior
SWC does support Android arm64, but somehow swc in nextjs cannot support it, i always switch to babel for workaround, but now i cant switch to use babel.
Verify canary release
Provide environment information
Which area(s) are affected? (Select all that apply)
CLI (create-next-app), Operating System (Windows, MacOS, Linux), Package manager (npm, pnpm, Yarn), SWC minifier (swcMinify: true), SWC transpilation
Additional context
fyi, i use termux to code. last version i tested fine was next 13.4