{"id":17500,"library":"autocorrect-node-linux-x64-musl","title":"Autocorrect Node Linux x64 Musl Binary","description":"This package (`autocorrect-node-linux-x64-musl`) provides the precompiled native binary for `autocorrect-node` tailored for Linux systems using the musl libc library on x64 architecture. `autocorrect-node` is a native Node.js addon built on NAPI.RS, offering fast and efficient text autocorrection, particularly beneficial for copywriting, correcting spaces, words, and punctuation in CJK (Chinese, Japanese, Korean) languages. This specific package is an internal, platform-dependent runtime dependency of the main `autocorrect-node` library and is not intended for direct use by developers. The current stable version for this binary, mirroring its parent package, is 2.14.0. Its release cadence is tightly coupled with the `autocorrect-node` project, typically updating with major `autocorrect-node` releases or when new native build targets are introduced.","status":"active","version":"2.14.0","language":"javascript","source_language":"en","source_url":null,"tags":["javascript"],"install":[{"cmd":"npm install autocorrect-node-linux-x64-musl","lang":"bash","label":"npm"},{"cmd":"yarn add autocorrect-node-linux-x64-musl","lang":"bash","label":"yarn"},{"cmd":"pnpm add autocorrect-node-linux-x64-musl","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"This package provides the native binary for `autocorrect-node` when running on Linux x64 with musl libc. It is an optional/conditional dependency of the main `autocorrect-node` package, which dynamically loads the appropriate platform-specific binary.","package":"autocorrect-node","optional":true}],"imports":[{"note":"This binary package is not directly imported. Users import from the main `autocorrect-node` package, which then transparently loads the correct platform-specific binary, such as this one, at runtime. `autocorrect-node` ships with TypeScript types.","symbol":"AutoCorrect","correct":"import { AutoCorrect } from 'autocorrect-node';"},{"note":"Similar to `AutoCorrect`, the `init` function (if exposed) from the main `autocorrect-node` package is what users interact with. This binary package remains an underlying dependency. Check `autocorrect-node`'s documentation for exact exports.","symbol":"init","correct":"import { init } from 'autocorrect-node';"},{"note":"The `autocorrect-node` package also provides a CLI. When `autocorrect-node` is installed, it may automatically use this platform-specific binary. Users typically invoke the CLI via `npx` or `yarn` without directly referencing this binary package.","symbol":"autocorrect CLI","correct":"yarn autocorrect --stdin 'hello世界'"}],"quickstart":{"code":"import { autocorrect } from 'autocorrect-node';\n\nasync function runAutocorrect() {\n  const text = \"你好Hello世界\";\n  // This implicitly uses the native binary for correction.\n  const correctedText = await autocorrect(text);\n  console.log(`Original: ${text}`);\n  console.log(`Corrected: ${correctedText}`);\n\n  // Example of using the CLI via programmatic execution (for illustration)\n  // In a real app, you'd typically run this directly from the shell or rely on build tools.\n  try {\n    const { exec } = await import('node:child_process');\n    exec(`echo \"${text}\" | yarn autocorrect --stdin`, (error, stdout, stderr) => {\n      if (error) {\n        console.error(`CLI exec error: ${error.message}`);\n        return;\n      }\n      if (stderr) {\n        console.error(`CLI stderr: ${stderr}`);\n        return;\n      }\n      console.log(`CLI Corrected: ${stdout.trim()}`);\n    });\n  } catch (e) {\n    console.warn(\"Cannot run CLI example without 'node:child_process' or yarn/npm in path.\", e);\n  }\n}\n\nrunAutocorrect().catch(console.error);","lang":"typescript","description":"Demonstrates basic usage of `autocorrect-node`'s `autocorrect` function, showcasing how the underlying native binary (this package) is implicitly utilized for text correction. Also includes a conceptual CLI usage."},"warnings":[{"fix":"Always update `autocorrect-node` and its platform-specific dependencies (like `autocorrect-node-linux-x64-musl`) to their latest compatible versions together.","message":"Major version upgrades of `autocorrect-node` may introduce breaking changes in the native module interface (NAPI), requiring a corresponding update to this binary package. Ensure `autocorrect-node` and its native binaries are kept in sync.","severity":"breaking","affected_versions":">=2.0.0"},{"fix":"Ensure that the correct platform-specific `autocorrect-node-*` package is installed for your environment. `autocorrect-node` typically handles this automatically via `optionalDependencies` or architecture detection; avoid direct installation of specific binary packages unless necessary for custom build environments.","message":"This package is specifically for `x86_64-unknown-linux-musl`. Installing it on an incompatible system (e.g., glibc-based Linux, macOS, Windows, or a different architecture) will lead to runtime errors when `autocorrect-node` attempts to load the native module.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Check your Node.js version and ensure it is compatible with the `autocorrect-node` binaries. Verify that your system's `libc` (musl or glibc) matches the binary variant. Reinstalling `node_modules` might resolve transient issues.","message":"Native Node.js modules can sometimes fail to load due to `node-abi` compatibility issues, mismatched Node.js versions, or specific system library versions (like `musl` vs `glibc`).","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-23T00:00:00.000Z","next_check":"2026-07-22T00:00:00.000Z","problems":[{"fix":"Ensure `autocorrect-node` is installed, which should pull in the correct platform binary as an `optionalDependency`. If manually installing, make sure `autocorrect-node-linux-x64-musl` matches your OS and `libc` variant. Verify Node.js version compatibility.","cause":"The main `autocorrect-node` package could not find or load a compatible native binary for your current environment. This often means the correct platform-specific binary (like `autocorrect-node-linux-x64-musl`) is missing or incompatible.","error":"Error: The `autocorrect` native module failed to load."},{"fix":"Run `npm install` or `yarn install` in your project root to ensure all dependencies are correctly installed. Check `package.json` for `autocorrect-node` and ensure that `npm` or `yarn` successfully installed the correct optional dependencies for your platform.","cause":"Node.js failed to locate the installed native binary package. This could be due to incorrect installation, corrupted `node_modules`, or an environment mismatch where `autocorrect-node` expects this specific package but it's not available.","error":"Error: Cannot find module 'autocorrect-node-linux-x64-musl'"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}