Next JS 14 SWC support for RPi/ARMV7?

431 views Asked by At

I'm unable to run a small Next JS 14 app on a Raspberry pi 4 (latest version as of right now is 14.0.4).

Visited https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/ and indeed, there are no binaries for any Next JS 14 released, last binary released by Vercel was for Next JS 13, several months ago, for this platform. I find that Vercel has released v14.x @next/swc binaries for Win/Linux platforms though, just not Linux-ARMV7.

Does this mean that RPis are out of luck with Next JS 14? (Next JS 13 works fine) Any alternatives or workarounds? Can't find much info out there.

Tried the following:

npx create-next-app@latest
cd myApp
npm i
npm run dev

Getting the following error:

Downloading swc package @next/swc-linux-arm-gnueabihf...  
⨯ Failed to download swc package from https://registry.npmjs.org/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-14.0.4.tgz

I've also tried using Babel with a simple .babelrc:

{
  "presets": ["next/babel"],
  "plugins": []
}

But this also outputs a bunch of errors:

Using external babel configuration from <myAppDir>/.babelrc  
⨯ ./node_modules/next/dist/client/dev/on-demand-entries-client.js 
(...)  
⨯ Error: ENOENT: no such file or directory, open '<myAppDir>/.next/fallback-build-manifest.json'
1

There are 1 answers

0
Ini90 On BEST ANSWER

As a result of further tinkering with the RPi4, the SD card got corrupted and had to resinstall everything (OS, Node, Next JS...).

I went ahead and tried the latest SW package versions available for pretty much every step of the reinstall process of the RPi including Next JS 14.0.4.

No idea what could have gone differently but to my surprise, it seems like it's running just fine now! The app builds and renders without issues. There is no need for SWC.

I wonder if a residual SWC dependency existed prior to the reinstallation process that forced Next JS to try at all costs to get that particular version of SWC.

In any case, the issue is resolved.