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

Cannot build nextjs app on FreeBSD #59997

Open
1 task done
patrykluba opened this issue Dec 28, 2023 · 16 comments
Open
1 task done

Cannot build nextjs app on FreeBSD #59997

patrykluba opened this issue Dec 28, 2023 · 16 comments
Labels
examples Issue was opened via the examples template.

Comments

@patrykluba
Copy link

Verify canary release

  • I verified that the issue exists in the latest Next.js canary release

Provide environment information

Operating System:
  Platform: freebsd
  Arch: x64
  Version: FreeBSD 13.2-RELEASE #0 releng/13.2-n254617-525ecfdad597-dirty: Wed May 31 19:03:43 CEST 2023     
Binaries:
  Node: 20.10.0
  npm: 9.6.6
  Yarn: 1.22.19
  pnpm: N/A
Relevant Packages:
  next: 14.0.4 / 14.0.5-canary.29
  eslint-config-next: 14.0.4
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.3.3
Next.js Config:
  output: N/A

Which example does this report relate to?

hello-world

What browser are you using? (if relevant)

No response

How are you deploying your application? (if relevant)

yarn build / yarn start

Describe the Bug

I have error:

[user@s62]:<~/domains/test.net/my-app>$ yarn build
yarn run v1.22.19
$ next build
   ▲ Next.js 14.0.4

   Downloading swc package @next/swc-freebsd-x64...
 ⨯ Failed to download swc package from https://registry.yarnpkg.com/@next/swc-freebsd-x64/-/swc-freebsd-x64-14.0.4.tgz
unhandledRejection Error: request failed with status 404

Even I adding to .babelrc:

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

and swcMinifty: false to next.config.js build still failing

Expected Behavior

App should build

To Reproduce

yarn build

@patrykluba patrykluba added the examples Issue was opened via the examples template. label Dec 28, 2023
@patrykluba patrykluba changed the title https://github.com/vercel/next.js/tree/canary/examples/hello-world Cannot build nextjs app on FreeBSD Dec 28, 2023
@loukamb
Copy link

loukamb commented Dec 31, 2023

Can reproduce. Whoever is in charge of these binaries have failed to produce them for (Free)BSD systems.

@ismatim
Copy link

ismatim commented Jan 4, 2024

pic-full-240104-0929-33

It happens on OpenBSD 7.4 and in FreeBSD 14.

@tinola
Copy link

tinola commented Jan 10, 2024

I can't build ztnet application.

My system: FreeBSD 14.0-RELEASE-p3

Errorlog:


> [email protected] build
> next build

   Skipping linting
 ✓ Checking validity of types
   ▲ Next.js 14.0.3
   - Environments: .env
   - Experiments (use at your own risk):
     · instrumentationHook

   Downloading swc package @next/swc-freebsd-x64...
 ⨯ Failed to download swc package from https://registry.npmjs.org/@next/swc-freebsd-x64/-/swc-freebsd-x64-14.0.3.tgz
unhandledRejection Error: request failed with status 404

@Vringe
Copy link

Vringe commented Jan 12, 2024

Same here with FreeBSD 13.2

@wangii
Copy link

wangii commented Feb 6, 2024

I had the same problem, even if I built the next-swc with rust it still crashed. I managed to get it running by using @next/swc-wasm-nodejs, and then change the node_modules/next/dist/build/swc/index.js, line 247, shouldLoadWasmFallbackFirst to true.

hope it helps.

@tinola
Copy link

tinola commented Feb 7, 2024

@wangii, which FreeBSD version do you use? I tried to build with your suggestion, but with no luck.

> next build

   Skipping linting
 ✓ Checking validity of types
   ▲ Next.js 14.0.3
   - Environments: .env
   - Experiments (use at your own risk):
     · instrumentationHook

   Downloading swc package @next/swc-wasm-nodejs...
 ⨯ Failed to download swc package from https://registry.npmjs.org/@next/swc-wasm-nodejs/-/swc-wasm-nodejs-14.0.3.tgz
 ⚠ Attempted to load @next/swc-freebsd-x64, but it was not installed
 ⨯ Failed to load SWC binary for freebsd/x64, see more info here: https://nextjs.org/docs/messages/failed-loading-swc

@wangii
Copy link

wangii commented Feb 7, 2024

The FreeBSD version I'm using: 14.0-RELEASE.

@tinola I don't think it's the version of FreeBSD matters here, it's the next.js version. I'm using 14.1.0. could you try this version of next?

@tinola
Copy link

tinola commented Feb 7, 2024

You're right, OS version doesn't matter.
After upgrade next to v.14.1.0, building app went just fine.
Thanks!

@avshyz
Copy link

avshyz commented Feb 27, 2024

Seems related to this
#58483

I receive a similar error when I try to build my next project on a raspberry pi

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

And was also unable to opt out of SWC

@davidnbooth
Copy link

davidnbooth commented Mar 2, 2024

I have the same issue. FreeBSD 13.2-RELEASE. Setting swcMinify:false in the config didn't help, workaround from @wangii above did work

@colonder
Copy link

@ijjk

@colonder
Copy link

@kwonoj

@colonder
Copy link

Yeah, so they deprecated freebsd as well as linux arm

@Vringe
Copy link

Vringe commented Apr 15, 2024

Can we please get an official statement if this is going to be fixed or if FreeBSD support actually is going to be dropped?

@erkisun
Copy link

erkisun commented Aug 9, 2024

I wonder if freebsd and nextjs will have a future ... is there anything left ?

▲ Next.js 14.2.5

✓ Starting...
Error: Could not find a production build in the '.next' directory. .....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
examples Issue was opened via the examples template.
Projects
None yet
Development

No branches or pull requests