{"id":12853,"library":"autocorrect-node-linux-x64-gnu","title":"Autocorrect Node.js Linux x64 GNU Binary","description":"autocorrect-node-linux-x64-gnu is a specialized npm package providing the prebuilt native binary for the `autocorrect-node` library, specifically tailored for x86_64 Linux systems utilizing the GNU C Library. The core `autocorrect-node` library functions as a robust linter and formatter, designed to improve copywriting by intelligently correcting spaces, words, and punctuations across various languages, with a particular focus on CJK (Chinese, Japanese, Korean) and English text. Built on NAPI.RS, it leverages Rust-based native modules for high performance. This platform-specific package is typically installed automatically as a transitive dependency when `autocorrect-node` is added to a project on a compatible Linux environment, eliminating the need for local compilation. The current stable version for the `autocorrect-node` ecosystem, including its associated binaries, is 2.14.0, which was last published approximately a year ago. It offers both a command-line interface and a programmatic API for flexible integration into Node.js applications and CI/CD pipelines.","status":"active","version":"2.14.0","language":"javascript","source_language":"en","source_url":null,"tags":["javascript"],"install":[{"cmd":"npm install autocorrect-node-linux-x64-gnu","lang":"bash","label":"npm"},{"cmd":"yarn add autocorrect-node-linux-x64-gnu","lang":"bash","label":"yarn"},{"cmd":"pnpm add autocorrect-node-linux-x64-gnu","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"The primary API is a default export, usable with both ESM `import` and CommonJS `require`. This specific binary package does not export symbols directly; functionality is accessed via the main 'autocorrect-node' package.","wrong":"const AutoCorrect = require('autocorrect-node');","symbol":"AutoCorrect","correct":"import AutoCorrect from 'autocorrect-node';"},{"note":"The 'format' method is exposed directly off the default imported 'AutoCorrect' object, not as a named export.","wrong":"import { format } from 'autocorrect-node';\nAutoCorrect.format('text');","symbol":"format","correct":"import AutoCorrect from 'autocorrect-node';\nawait AutoCorrect.format('text');"},{"note":"The 'lint' method is exposed directly off the default imported 'AutoCorrect' object, not as a named export.","wrong":"import { lint } from 'autocorrect-node';\nAutoCorrect.lint('text');","symbol":"lint","correct":"import AutoCorrect from 'autocorrect-node';\nawait AutoCorrect.lint('text');"}],"quickstart":{"code":"import AutoCorrect from 'autocorrect-node';\n\nasync function correctText() {\n  const text = \"你好hello世界，这是一段中文english混合文本。\";\n  console.log(\"Original text:\", text);\n\n  // Lint the text to find issues according to configured rules\n  const lintResult = await AutoCorrect.lint(text);\n  console.log(\"Linting results:\", JSON.stringify(lintResult, null, 2));\n  /* Example lint output for the provided text:\n  [\n    {\n      \"filepath\": \"inline\",\n      \"line\": 1,\n      \"col\": 3,\n      \"message\": \"Add a space between CJK and English\",\n      \"rule\": \"space-around-english\",\n      \"severity\": 2,\n      \"insert\": \" \"\n    },\n    {\n      \"filepath\": \"inline\",\n      \"line\": 1,\n      \"col\": 14,\n      \"message\": \"Add a space between CJK and English\",\n      \"rule\": \"space-around-english\",\n      \"severity\": 2,\n      \"insert\": \" \"\n    }\n  ]\n  */\n\n  // Format the text to apply automatic corrections based on linting suggestions\n  const formattedText = await AutoCorrect.format(text);\n  console.log(\"Formatted text:\", formattedText);\n  // Expected output: \"你好 hello 世界，这是一段中文 english 混合文本。\"\n\n  // Initialize a default configuration file (.autocorrectrc) if it doesn't exist\n  // await AutoCorrect.init();\n  // console.log(\"Default config generated (if not exists): .autocorrectrc\");\n}\n\ncorrectText().catch(console.error);","lang":"typescript","description":"Demonstrates how to use `autocorrect-node` to lint and format a mixed CJK/English text string programmatically."},"warnings":[{"fix":"Instead of installing this binary directly, install the main `autocorrect-node` package (`npm install autocorrect-node`). It includes logic to automatically detect your system and fetch the correct prebuilt binary, or compile it from source if a prebuilt version is not available.","message":"This package (`autocorrect-node-linux-x64-gnu`) is a prebuilt native binary specifically for x86_64 Linux GNU systems. Directly installing it on an incompatible operating system or architecture (e.g., macOS, Windows, or ARM Linux) will lead to runtime errors or compilation failures.","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Ensure your Node.js version meets the `autocorrect-node`'s `engines.node` requirement (current `>= 10`). If issues persist after a Node.js upgrade, try clearing your `node_modules` and `npm cache clean --force`, then reinstalling `autocorrect-node` to force recompilation or download of a compatible binary. Consider using a Node.js version manager like `nvm` to easily switch and manage Node.js versions.","message":"Native Node.js modules, including `autocorrect-node` (which consumes this binary), are highly sensitive to Node.js version changes due to ABI (Application Binary Interface) compatibility. Upgrading or downgrading your Node.js runtime significantly can cause 'Module was compiled against a different Node.js version' errors.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Ensure your Linux environment is up-to-date and includes common system libraries. For Docker, use a robust base image (e.g., `node:lts-slim` or `ubuntu`) and install any necessary runtime dependencies. Error messages will usually indicate the missing library (e.g., 'cannot open shared object file: No such file or directory').","message":"This package may rely on specific system-level shared libraries (e.g., `libc.so.6` for GNU systems). In minimal Linux environments or Docker containers, these libraries might be missing or older versions, leading to dynamic linking errors.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-19T00:00:00.000Z","next_check":"2026-07-18T00:00:00.000Z","problems":[{"fix":"Update or downgrade your Node.js version to match the expected ABI, or clear `node_modules` and `npm cache clean --force` then reinstall `autocorrect-node` to trigger a fresh build or download of the correct binary. Using a Node.js version manager is recommended.","cause":"The native binary bundled with or compiled for `autocorrect-node` is incompatible with your current Node.js runtime's ABI.","error":"Error: The `autocorrect-node` module was compiled against a different Node.js version. This version of Node.js cannot load this module. (Current Node.js version: X.Y.Z, expected Node.js version: A.B.C)"},{"fix":"First, ensure you are running `npm install autocorrect-node` (not this binary directly). If the error persists, verify your operating system and architecture are supported. Clear `node_modules`, `package-lock.json`, and npm cache, then reinstall. Check npm logs for specific build errors during installation.","cause":"The platform-specific binary for `autocorrect-node` could not be found or loaded, often due to an incorrect platform, failed installation, or corrupted `node_modules`.","error":"Error: Cannot find module 'autocorrect-node-linux-x64-gnu'"},{"fix":"Install the missing system library using your distribution's package manager (e.g., `sudo apt-get install libstdc++6` on Debian/Ubuntu, `sudo yum install libstdc++` on RHEL/CentOS). Ensure your environment is up-to-date.","cause":"A required system-level shared library (here, `libstdc++.so.6`) is missing from your Linux environment, preventing the native binary from loading.","error":"Error: Dynamic Linking Error: libstdc++.so.6: cannot open shared object file: No such file or directory"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null}