-
Notifications
You must be signed in to change notification settings - Fork 341
Closed
Labels
[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Description
WordPress Playground installation fails on systems with Python 3.13 due to the `fs-ext` package failing to compile. The error occurs because Python 3.13 removed the `distutils` module, which `node-gyp` depends on for native module compilation.
Error Details
Environment:
- Node.js: v24.2.0
- npm: 11.3.0
- Python: 3.13.5
- macOS: Darwin 24.5.0 (arm64)
Error Message:
npm error gyp ERR! stack Error: \`gyp\` failed with exit code: 1
npm error Traceback (most recent call last):
npm error File \"/node_modules/node-gyp/gyp/pylib/gyp/input.py\", line 19, in <module>
npm error from distutils.version import StrictVersion
npm error ModuleNotFoundError: No module named 'distutils'
Root Cause:
- Python 3.13+ removed the `distutils` module (PEP 632)
- `fs-ext` package requires native compilation via `node-gyp`
- `node-gyp` still depends on the removed `distutils` module
- `fs-ext` is used for file locking in the Node.js PHP WASM implementation
Solution
I fixed this for myself with Claude Code's help. I had to downgrade to Python 3.12 and install `setuptools` to provide the missing `distutils` module.
Figured it made sense to document it. Cool project!
Metadata
Metadata
Assignees
Labels
[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended