sandbox-npm-install
Installation
SKILL.md
Sandbox npm Install
When to Use This Skill
Use this skill whenever:
- You need to install npm packages for the first time in a new sandbox session
package.jsonorpackage-lock.jsonhas changed and you need to reinstall- You encounter native binary crashes with errors like
SIGILL,SIGSEGV,mmap, orunaligned sysNoHugePageOS - The
node_modulesdirectory is missing or corrupted
Prerequisites
- A Docker sandbox environment with a virtiofs-mounted workspace
- Node.js and npm available in the container
- A
package.jsonfile in the target workspace
Background
Docker sandbox workspaces are typically mounted via virtiofs (file sync between the host and Linux VM). Native Go and Rust binaries (esbuild, lightningcss, rollup, etc.) crash with mmap alignment failures when executed from virtiofs on aarch64. The fix is to install on the container's local ext4 filesystem and symlink back into the workspace.