tailwindlabs/tailwindcss · error · Error
Unsupported libc on: ${process.platform}-${process.arch}
Error message
Unsupported libc on: ${process.platform}-${process.arch} What it means
Patched into @parcel/watcher's native-binding loader. The patch uses detect-libc's familySync() to pick a platform/arch-specific binary; if the detected libc family is neither MUSL nor GLIBC (e.g. a BSD libc, or an unrecognized environment), it throws. This replaces upstream logic that assumed glibc-style suffixes.
Source
Thrown at patches/@parcel__watcher@2.6.0.patch:58
- binding = require('./build/Debug/watcher.node');
- } catch (err) {
- handleError(err);
- throw new Error(
- `No prebuild or local build of @parcel/watcher found. Tried ${name}. Please ensure it is installed (don't use --no-optional when installing with npm). Otherwise it is possible we don't support your platform yet. If this is the case, please report an issue to https://github.com/parcel-bundler/watcher.`,
- );
- }
- }
-}
-function handleError(err) {
- if (err?.code !== 'MODULE_NOT_FOUND') {
- throw err;
+ if (family === MUSL) {
+ return require(`@parcel/watcher-${process.platform}-${process.arch}-musl`)
+ } else if (family === GLIBC) {
+ return require(`@parcel/watcher-${process.platform}-${process.arch}-glibc`)
+ } else {
+ throw new Error(`Unsupported libc on: ${process.platform}-${process.arch}`)
+ }
+ }
+ } else {
+ return require(`@parcel/watcher-${process.platform}-${process.arch}`)
}
}
-const wrapper = createWrapper(binding);
+const wrapper = createWrapper(loadPackage());
exports.writeSnapshot = wrapper.writeSnapshot;
exports.getEventsSince = wrapper.getEventsSince;
exports.subscribe = wrapper.subscribe;
View on GitHub (pinned to 16e94cbf7f)
Solutions
- Verify your libc: run 'ldd --version' or 'node -e "console.log(require('detect-libc').familySync())"'.
- Preinstall the correct platform-specific binary package directly (e.g. @parcel/watcher-linux-x64-gnu).
- Update detect-libc to a version that recognizes your environment.
- If on a truly unsupported libc, switch to a polling-based file watcher or a glibc/musl container.
Example fix
# before — detect-libc returns UNKNOWN, patch throws # (no code fix; environment fix) # after — pin the correct binary package npm i @parcel/watcher-linux-x64-glibc --build-from-source=false
Defensive patterns
Strategy: validation
Validate before calling
const { familySync, MUSL, GLIBC } = require('detect-libc')
const family = familySync()
if (family !== MUSL && family !== GLIBC) {
throw new Error(`Unsupported libc family: ${family} — install the binary manually`)
} Type guard
function isSupportedLibc(family: string | null): boolean {
return family === 'musl' || family === 'glibc'
} Try / catch
try {
require('@parcel/watcher')
} catch (e) {
if (/Unsupported libc/.test(e.message)) {
// fall back to a polling watcher
}
} Prevention
- Run in a standard glibc or musl Linux environment.
- Preinstall the platform-specific binary package in CI/Docker.
- Verify detect-libc reports correctly in your container.
When it happens
Trigger: Running @parcel/watcher on a platform where detect-libc returns a family other than MUSL or GLIBC. Non-Linux platforms normally skip this branch (the else at the bottom requires the default binding), so this fires on unusual Linux/libc combinations or environments where familySync misreports.
Common situations: Building/running in an exotic container or musl/glibc hybrid. A locked-down CI sandbox where detect-libc cannot read ld.so and returns unknown. Cross-compilation targets. A broken detect-libc version returning an unexpected family constant.
Related errors
- Unsupported libc on: ${process.platform}-${process.arch}
- unsupported platform
- walkdir: same_file_system option not supported on this platf
AI-assisted analysis of tailwindlabs/tailwindcss@16e94cbf7f (2026-08-12).
Data as JSON: /api/errors/cfbbd9c7af63e9c9.
Report an issue: GitHub.