{"record":{"id":"cfbbd9c7af63e9c9","repo":"tailwindlabs/tailwindcss","slug":"unsupported-libc-on-process-platform-process","errorCode":null,"errorMessage":"Unsupported libc on: ${process.platform}-${process.arch}","messagePattern":"Unsupported libc on: (.+?)-(.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"patches/@parcel__watcher@2.6.0.patch","lineNumber":58,"sourceCode":"-      binding = require('./build/Debug/watcher.node');\n-    } catch (err) {\n-      handleError(err);\n-      throw new Error(\n-        `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.`,\n-      );\n-    }\n-  }\n-}\n \n-function handleError(err) {\n-  if (err?.code !== 'MODULE_NOT_FOUND') {\n-    throw err;\n+      if (family === MUSL) {\n+        return require(`@parcel/watcher-${process.platform}-${process.arch}-musl`)\n+      } else if (family === GLIBC) {\n+        return require(`@parcel/watcher-${process.platform}-${process.arch}-glibc`)\n+      } else {\n+        throw new Error(`Unsupported libc on: ${process.platform}-${process.arch}`)\n+      }\n+    }\n+  } else {\n+    return require(`@parcel/watcher-${process.platform}-${process.arch}`)\n   }\n }\n \n-const wrapper = createWrapper(binding);\n+const wrapper = createWrapper(loadPackage());\n exports.writeSnapshot = wrapper.writeSnapshot;\n exports.getEventsSince = wrapper.getEventsSince;\n exports.subscribe = wrapper.subscribe;\n","sourceCodeStart":40,"sourceCodeEnd":71,"githubUrl":"https://github.com/tailwindlabs/tailwindcss/blob/16e94cbf7f965c5ad697e90e940b5e178efad67c/patches/@parcel__watcher@2.6.0.patch#L40-L71","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"# before — detect-libc returns UNKNOWN, patch throws\n# (no code fix; environment fix)\n\n# after — pin the correct binary package\nnpm i @parcel/watcher-linux-x64-glibc --build-from-source=false","handlingStrategy":"validation","validationCode":"const { familySync, MUSL, GLIBC } = require('detect-libc')\nconst family = familySync()\nif (family !== MUSL && family !== GLIBC) {\n  throw new Error(`Unsupported libc family: ${family} — install the binary manually`)\n}","typeGuard":"function isSupportedLibc(family: string | null): boolean {\n  return family === 'musl' || family === 'glibc'\n}","tryCatchPattern":"try {\n  require('@parcel/watcher')\n} catch (e) {\n  if (/Unsupported libc/.test(e.message)) {\n    // fall back to a polling watcher\n  }\n}","preventionTips":["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."],"tags":["parcel-watcher","native-binding","libc","platform","patch"],"backgroundTag":null,"analyzedSha":"16e94cbf7f965c5ad697e90e940b5e178efad67c","analyzedAt":"2026-08-12T06:02:42.469Z","schemaVersion":2},"datasetVersion":"2026-08-12T13:17:24.610Z"}