{"id":11435,"library":"node-linux-arm64","title":"Node.js (Linux ARM64 Binary)","description":"Node.js is an open-source, cross-platform JavaScript runtime environment that allows developers to execute JavaScript code outside a web browser. It is built on Chrome's V8 JavaScript engine and utilizes an event-driven, non-blocking I/O model, making it highly efficient and scalable for networked applications, real-time applications, and microservices. The project follows semantic versioning, adhering to a regular release cadence with new major versions introduced every six months in April and October. Even-numbered major releases transition into Long Term Support (LTS), which provides 12 months of active support followed by an additional 18 months of maintenance, prioritizing stability and security fixes. Odd-numbered releases are designated 'Current' and maintain an 8-month support lifecycle. The `node-linux-arm64` package, specifically version 24.15.0, serves as a direct distribution of the Node.js runtime binary compiled for the Linux ARM64 architecture, offering a convenient and platform-specific method for integrating a particular Node.js version into projects or deployment pipelines targeting compatible ARM64 systems without requiring compilation from source. This package simplifies the deployment process for environments such as Raspberry Pi devices or cloud instances utilizing ARM-based processors.","status":"active","version":"24.15.0","language":"javascript","source_language":"en","source_url":"https://github.com/aredridel/node-bin-gen","tags":["javascript"],"install":[{"cmd":"npm install node-linux-arm64","lang":"bash","label":"npm"},{"cmd":"yarn add node-linux-arm64","lang":"bash","label":"yarn"},{"cmd":"pnpm add node-linux-arm64","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"For asynchronous file operations using Promises, import from `node:fs/promises`. Direct CommonJS `require()` is also common for `fs` and other built-in modules in older projects or CJS contexts.","wrong":"const { readFile } = require('fs').promises;","symbol":"readFile (from Node.js `fs` module)","correct":"import { readFile } from 'node:fs/promises';"},{"note":"Named imports are often preferred for specific functions from built-in modules for better tree-shaking potential and clarity. The `node:` protocol prefix is recommended for built-in modules in ESM contexts.","wrong":"import http from 'http'; http.createServer(...);","symbol":"createServer (from Node.js `http` module)","correct":"import { createServer } from 'node:http';"},{"note":"`process` is a global object in Node.js and does not require explicit `import` or `require()` for runtime access to properties like `env`, `argv`, or `exit`. Type imports are distinct.","wrong":"import { env } from 'node:process';","symbol":"process.env (Node.js global object)","correct":"const port = process.env.PORT ?? 3000;"}],"quickstart":{"code":"import { createServer } from 'node:http';\n\nconst hostname = '127.0.0.1';\nconst port = parseInt(process.env.PORT ?? '3000', 10);\n\nconst server = createServer((req, res) => {\n  res.statusCode = 200;\n  res.setHeader('Content-Type', 'text/plain');\n  res.end('Hello, Node.js on Linux ARM64!\\n');\n});\n\nserver.listen(port, hostname, () => {\n  console.log(`Server running at http://${hostname}:${port}/`);\n});\n","lang":"typescript","description":"Demonstrates a basic Node.js HTTP server listening on a configurable port (defaults to 3000), responding with a simple text message."},"warnings":[{"fix":"Always review the official Node.js changelog for your target version and follow recommended migration steps. Use a robust CI/CD pipeline with thorough testing against new Node.js versions.","message":"Node.js introduces new major versions every six months (April and October), which frequently include breaking changes. Developers must consult official release notes and migration guides (e.g., nodejs.org/docs/latest/api/changelog.html) before upgrading between major versions to ensure application compatibility.","severity":"breaking","affected_versions":">=1.0.0"},{"fix":"Be consistent with module systems. Use `.mjs` for ESM and `.cjs` for CommonJS, or configure the `\"type\"` field in `package.json` to `'module'` for ESM or `'commonjs'` for CJS. Use dynamic `import()` for loading ESM from CJS, and `createRequire` for loading CJS from ESM.","message":"Node.js supports two module systems: CommonJS (`require`/`module.exports`) and ES Modules (`import`/`export`). Mixing them improperly or using the wrong syntax for a given module context (e.g., requiring an ESM module in a CJS file) leads to `ERR_REQUIRE_ESM` errors.","severity":"gotcha","affected_versions":">=12.0.0"},{"fix":"Ensure all Promises have `.catch()` handlers, use `try/catch` with `async/await`, or implement a global `process.on('unhandledRejection', handler)` as a last resort fallback for logging and graceful shutdown.","message":"Unhandled Promise rejections, where a Promise rejects without a `.catch()` handler or `try/catch` block for `await` expressions, can lead to silent failures or unexpected process termination (especially since Node.js 15+).","severity":"gotcha","affected_versions":">=6.0.0"},{"fix":"Explicitly parse environment variables to their intended types, e.g., `parseInt(process.env.PORT || '3000', 10)` for numbers or `process.env.DEBUG === 'true'` for booleans.","message":"Environment variables accessed via `process.env` are always strings. Attempting to use them directly as numbers or booleans will result in incorrect logic or runtime errors if explicit type conversion is not performed.","severity":"gotcha","affected_versions":"*"},{"fix":"Ensure that code relying on browser APIs is only executed in a browser environment. Use conditional logic (`typeof window !== 'undefined'`) or isomorphic libraries that abstract environment differences if code needs to run in both contexts.","message":"Node.js (and this specific binary package) is a server-side JavaScript runtime. Attempting to use browser-specific global objects or APIs like `window`, `document`, or `localStorage` will result in `ReferenceError: window is not defined` errors.","severity":"gotcha","affected_versions":"*"}],"env_vars":null,"last_verified":"2026-04-19T00:00:00.000Z","next_check":"2026-07-18T00:00:00.000Z","problems":[{"fix":"Change the `require()` call to a dynamic `import()` statement, or ensure the imported module is a CommonJS module. Check `package.json` `\"type\"` field and file extensions (`.mjs`/`.cjs`).","cause":"A CommonJS `require()` call was used to load a module that is defined as an ES Module.","error":"Error [ERR_REQUIRE_ESM]: Must use import to load ES Module"},{"fix":"Verify the module name is correct. Install the module using `npm install your-package-name` or `yarn add your-package-name`. Ensure `node_modules` is present and accessible in the project root.","cause":"The specified module is either not installed, misspelled, or Node.js cannot resolve its path.","error":"Error: Cannot find module 'your-package-name'"},{"fix":"Change the application to listen on a different port, or identify and terminate the process currently occupying the port (e.g., `lsof -i :3000` on Linux/macOS or `netstat -ano | findstr :3000` on Windows, then `kill <PID>`).","cause":"The network port (e.g., 3000) that the Node.js application is trying to bind to is already in use by another process.","error":"Error: listen EADDRINUSE: address already in use :::3000"},{"fix":"Add `.catch()` handlers to all promise chains or wrap `await` calls in `try/catch` blocks. For global fallbacks, implement `process.on('unhandledRejection', handler)`.","cause":"A Promise within the application was rejected, but there was no `.catch()` handler or `try/catch` block to explicitly handle the rejection.","error":"(node:12345) UnhandledPromiseRejectionWarning: Unhandled promise rejection."},{"fix":"Refactor the code to avoid browser-specific globals when running in Node.js. Use conditional checks (`typeof window !== 'undefined'`) or abstract browser-dependent logic into client-side-only modules.","cause":"Node.js code attempted to access the browser-specific `window` object, which does not exist in the Node.js runtime environment.","error":"ReferenceError: window is not defined"}],"ecosystem":"npm"}