Registry / devops / nodejs-wheel

nodejs-wheel

JSON →
library24.16.0pypypi✓ verified 84d ago

nodejs-wheel is an unofficial Python package that distributes prebuilt Node.js binaries as wheels on PyPI. It enables Python projects to declare and install Node.js as a dependency via `pip`, providing access to `node`, `npm`, and `npx` commands within a Python environment. The current version, 24.14.1, was released on March 31, 2026, and the project generally follows the Node.js release schedule, which sees new major versions biannually in April and October. It supports Python 3.7 and above.

pip install nodejs-wheel
INSTALL
IMPORT
SIG · NODEJS-WHEEL
N
nodejs-wheel
devopspythonv24.16.0
Install
3.9s avg
Import
23ms
Disk
369MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v24.16.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.940 runs
installs and imports cleanly · install 0.0s · import 0.024s · 340MB
glibc
py 3.103.940 runs
installs and imports cleanly · install 3.9s · import 0.022s · 399MB
369MB installed
● package 369MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

node
from nodejs_wheel import node
npm
from nodejs_wheel import npm
npx
from nodejs_wheel import npx
corepack
from nodejs_wheel import corepack
Available since v22.13.1.

This quickstart demonstrates how to import and execute Node.js and npm commands directly from Python. It shows how to retrieve both the exit code and the full `subprocess.CompletedProcess` object for more detailed output handling.

import os from nodejs_wheel import node, npm # Run a Node.js command and get the exit code node_version_exit_code = node(['--version']) print(f'Node.js --version exit code: {node_version_exit_code}') # Run a Node.js command and get the CompletedProcess object for detailed output node_version_process = node(['--version'], return_completed_process=True) print(f'Node.js version: {node_version_process.stdout.strip()}') # Run an npm command npm_version_process = npm(['--version'], return_completed_process=True) print(f'npm version: {npm_version_process.stdout.strip()}')
node --version
Debug
Known issues
gotchaThis is an unofficial distribution of Node.js. While it aims to provide official binaries, users should be aware that it's not maintained by the official Node.js project.
fix
Verify the source and integrity if strict official guarantees are required. For production environments, consider official Node.js installation methods if this unofficial distribution poses a concern.
affects: All versions
breakingUpgrading major versions of `nodejs-wheel` (which correspond to Node.js major versions) may introduce breaking changes from Node.js itself, including changes to platform support (e.g., macOS minimum versions, 32-bit OS deprecation), OpenSSL versions, and core API behaviors. For example, Node.js v24 deprecated 32-bit Windows and armv7 Linux binaries, and requires macOS 13.5+ for pre-built binaries.
fix
Refer to the official Node.js release notes for breaking changes and test thoroughly before upgrading. Ensure your environment meets the minimum requirements for the target Node.js version.
affects: All major version upgrades (e.g., v22 to v24)
gotchaFor installations where only the Node.js binaries are needed and Python API/CLI integration is not desired, consider installing `nodejs-wheel-binaries` directly. This avoids installing the full `nodejs-wheel` package, which acts as a wrapper and adds CLI entry points.
fix
Use `pip install nodejs-wheel-binaries` if only binaries are required. If both `nodejs-wheel` and `nodejs-wheel-binaries` are installed, `nodejs-wheel`'s entry points will take precedence.
affects: All versions >= 20.13.0
gotchaWhen using the Python API (e.g., `node()`, `npm()`), the functions by default return the exit code (an `int`). To get a `subprocess.CompletedProcess` object for richer output, error stream, and process handling, pass `return_completed_process=True` to the function call.
fix
Modify API calls to `function_name(..., return_completed_process=True)` to receive the `CompletedProcess` object.
affects: All versions >= 20.13.1
gotchaNode.js applications, whether executed via this package or directly, can be prone to common issues like blocking the event loop with synchronous operations, unhandled asynchronous errors (Promise rejections), and module not found errors.
fix
Adhere to Node.js best practices for asynchronous programming, error handling (e.g., `try-catch` with `async/await`, `.catch()` for Promises), and proper module resolution. Utilize Node.js-specific debugging tools when developing and testing Node.js code.
affects: All versions
Errors
Common errors & fixes
node: command not found
After installing `nodejs-wheel`, the `node`, `npm`, or `npx` executables are not found in the system's PATH environment variable, or the shell session hasn't been reloaded to pick up the updated PATH.
fix
To execute Node.js commands from Python, use `python -m nodejs_wheel.node <args>` or `python -m nodejs_wheel.npm <args>`. If you need to call `node` or `npm` directly from your terminal, ensure your shell environment's PATH includes the directory where `nodejs-wheel` installs its executables (typically `your_venv/bin` or `your_venv/Scripts`). Reloading your shell or virtual environment often resolves this.
ModuleNotFoundError: No module named 'nodejs_wheel'
This error occurs when Python code attempts to `import nodejs_wheel` directly, often misunderstanding that `nodejs-wheel` primarily provides Node.js executables rather than a traditional Python library with a main API for direct import. While it has internal Python modules, they are typically accessed via `python -m nodejs_wheel.node` or helper functions, not a top-level `import` for general Node.js operations.
fix
Instead of `import nodejs_wheel`, interact with the Node.js binaries using the provided Python entry points, e.g., `subprocess.run([sys.executable, '-m', 'nodejs_wheel.node', '--version'])` to run Node.js, or access utility functions like `nodejs_wheel.executable.node_path()` if you need the path to the executable programmatically.
ERROR: Could not find a version that satisfies the requirement nodejs-wheel (from versions: none)
This issue arises when `pip` cannot locate a pre-built binary wheel for `nodejs-wheel` compatible with your specific operating system, CPU architecture, or Python version.
fix
Verify that your operating system, architecture, and Python version (Python 3.7+ is supported) are officially supported by `nodejs-wheel`. Check the package's PyPI page for available wheels. If no compatible wheel exists, consider installing Node.js manually or compiling it from source, or using a different environment where a compatible wheel is available.
Upgrade
Version history
24.16.0latest on PyPI · released May 30, 2026
Audit
Dependencies
nodejs-wheel-binariesoptionalDirect dependency for core binaries; can be installed separately for minimal footprint.
Agent activity
18 hits · last 30 days
node
18
Resources
nodejs-wheel — pip install nodejs-wheel · libregistry