Error: Unsupported platform: freebsd
See original GitHub issueVerify canary release
- I verified that the issue exists in the latest Next.js canary release
Provide environment information
yarn info v1.22.18
{
name: ‘my-app’,
description: ‘my-app’,
‘dist-tags’: { latest: ‘0.1.0’ },
versions: [ ‘0.1.0’ ],
maintainers: [ { name: ‘mdathrika’, email: ‘mdathrika@ebay.com’ }
time: {
modified: ‘2022-06-20T15:34:47.301Z’,
created: ‘2013-05-30T19:30:56.012Z’,
‘0.1.0’: ‘2013-05-30T19:30:58.974Z’
},
users: {
‘enas-443’: true
},
version: ‘0.1.0’,
scripts: {
start: ‘node server.js’
},
license: ‘Apache License 2.0’,
dependencies: {
raptor: ‘>=2.3.0’,
optimist: ‘~0.3.5’,
‘express-raptor’: ‘~0.1.2’,
express: ‘~3.1.1’,
request: ‘~2.16.6’,
‘ebay-global-header’: ‘git://github.scm.corp.ebay.com/cubejs-ebay/ebay-global-header-node.git’,
‘raptor-optimizer-ready-plugin’: ‘git://github.scm.corp.ebay.com/cubejs-ebay/raptor-optimizer-ready-plugin.git’,
‘ebay-ui-components’: ‘git://github.scm.corp.ebay.com/Raptor/RaptorUIComponents.git’,
‘raptor-hot-reload’: ‘~0.1.3’,
‘socket.io’: ‘~0.9.14’,
cluster2: ‘git://github.scm.corp.ebay.com/cubejs/cluster2.git’,
‘context-config’: ‘git://github.scm.corp.ebay.com/cubejs/context-config-node.git’,
‘raptor-config’: ‘git://github.scm.corp.ebay.com/cubejs-ebay/raptor-config-node.git’
},
devDependencies: {},
readmeFilename: ‘README.md’,
dist: {
shasum: ‘495332e31a4fa9bca5e100798f7cfb30663c73ad’,
tarball: ‘https://registry.npmjs.org/my-app/-/my-app-0.1.0.tgz’,
integrity: ‘sha512-CLIDEWQdnm3x96rWAQgm9u+jorK1KdGN9SC1qoyHuEc3KyKIw1NJ6fQ3p1NzDMPSpVt01ojiUbtdsZuIlQ4nPQ==’,
signatures: [
{
keyid: ‘SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA’,
sig: ‘MEUCIE2UwWOiqF7h+/wy7couMhgLBPBNm3dMhi3qyVUt+MtjAiEAlMyO12Ros0SDJiQRteOCMr+mPm8mtDGDmAn662Nkzr4=’
}
]
},
directories: {}
}
Done in 1.20s.
What browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
yarn create next-app --typescript followed by yarn dev
Describe the Bug
Following the instructions in the getting started docs should be a simple enough affair.
But on FreeBSD it doesn’t compile.
I do the automatic setup using yarn create next-app --typescript
followed by yarn dev
.
This throws an error
$ next dev
ready - started server on 0.0.0.0:3000, url: http://localhost:3000
info - SWC minify release candidate enabled. https://nextjs.link/swcmin
Error: Unsupported platform: freebsd
at /usr/home/crm/new_app/my-app/node_modules/next/dist/lib/download-wasm-swc.js:84:31
at Object.downloadWasmSwc (/usr/home/crm/new_app/my-app/node_modules/next/dist/lib/download-wasm-swc.js:98:7)
at async /usr/home/crm/new_app/my-app/node_modules/next/dist/build/swc/index.js:114:13
Done in 3.22s.
$
)
I try also by disabling swcMinify in next.config.js. The Error is the same.
There were past issues about this and they were marked closed, so I assumed this would have been resolved by now.
Expected Behavior
yarn dev
should succeed.
Link to reproduction
Just follow the instructions in the getting started guide.
To Reproduce
Just follow the instructions in the getting started guide.
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:8 (3 by maintainers)
Top GitHub Comments
This is a parcel issue.
Experiencing the same thing with Gatsby (our build machines all use FreeBSD so this is causing major headaches for us as we have to temporarily resort to low performance hypervisor builds). Can someone notify the relevant devs that FreeBSD still exists?
This error comes from
node_modules/next/dist/lib/download-wasm-swc.js
because the cache file location is not specified for FreeBSD. That’s easily solvable by adding something likeelse if (process.platform === "freebsd") { systemCacheDirectory = _path.default.join(_os.default.homedir(), ".cache");
in the block where cache directory locations are being set for Linux, Darwin, Windows.After fixing this
next dev
actually starts to work.next build
though, breaks badly.The directory location mentioned in text of the panic message (pasting again below) indicates either a MacOS location is hard coded, or it is treating FreeBSD and MacOS identically.
This definitely needs a closer look.
Or perhaps, SWC won’t actually work here, so FreeBSD users should spare themselves the trouble and just use Babel.