DO

docker-node-version-compat-modules

Resolves Node.js version mismatches when mounting host node_modules into Docker containers.

Install

mkdir -p .claude/skills/docker-node-version-compat-modules && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/12266" && unzip -o skill.zip -d .claude/skills/docker-node-version-compat-modules && rm skill.zip

Installs to .claude/skills/docker-node-version-compat-modules

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Fix Node.js CLI tools crashing inside Docker containers when host-installed node_modules require a newer Node version than the container provides. Use when: (1) "SyntaxError: Invalid regular expression flags" with /v flag in string-width or similar packages, (2) node_modules installed on host with Node 20+ but container has Node 18, (3) `npm install` with file: protocol creates symlinks that break inside Docker, (4) pnpm workspace packages become broken symlinks in containers. Covers version detection, Node binary mounting, and npm install strategies for cross-version compatibility.
589 chars✓ has a “when” triggerlonger than Claude Code's old 250-char listing cap (fine on current versions)
Intermediate

Key capabilities

  • →Detect Node.js version mismatches between host and Docker containers.
  • →Diagnose 'SyntaxError: Invalid regular expression flags' errors.
  • →Identify issues with host-installed node_modules requiring newer Node versions.
  • →Resolve broken symlinks created by 'npm install file:' protocol.
  • →Address pnpm workspace package symlink issues in containers.
  • →Mount a newer Node.js binary into the container for compatibility.

How it works

The skill diagnoses Node.js version compatibility and symlink issues in Docker containers with host-mounted node_modules, then provides solutions like mounting a compatible Node.js binary or using specific npm/pnpm installation strategies.

Inputs & outputs

You give it
Docker container environment with host-mounted node_modules and Node.js version mismatch or symlink issues
You get back
Working Node.js application within the Docker container

When to use docker-node-version-compat-modules

  • →Fix Invalid regular expression flag error
  • →Resolve node_modules symlink issues in Docker
  • →Fix pnpm workspace container crashes

About docker-node-version-compat-modules

Detects and fixes runtime errors caused by mismatched Node versions (e.g., Unicode flag support). It manages dependency installation strategies to ensure cross-version compatibility.

|

When not to use it

  • →When the problem is not related to Node.js version compatibility in Docker.
  • →When node_modules are not mounted from the host into the container.
  • →When the error is not 'SyntaxError: Invalid regular expression flags' or symlink related.

Limitations

  • →npm does not enforce 'engines' constraints by default for transitive dependencies.
  • →'npm install file:' protocol creates symlinks that may break in Docker.
  • →pnpm workspace symlinks can be broken inside Docker containers.

How it compares

This skill offers targeted solutions for specific Node.js compatibility and symlink problems within Docker, including binary mounting and package management strategies, which differs from general Docker or Node.js troubleshooting.

Compared to similar skills

docker-node-version-compat-modules side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
docker-node-version-compat-modules (this skill)09moReviewIntermediate
agent-sandbox19moNo flagsIntermediate
openevidence-deploy-integration14moCautionIntermediate
DevOps Engineer Skills07moReviewAdvanced

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

Search skills

Search the agent skills registry