windows-npm-run-script-shell
Use when Windows npm run, npm test, npm run build, or npm run-script exits before running the script with ERR_INVALID_ARG_TYPE, "file argument must be of type…
Skill by JinNing6
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/jinning6-windows-npm-run-script-shell
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: testing
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md. Checked Oct 25, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/windows-npm-run-script-shell
What's inside
- Skill name
windows-npm-run-script-shell- Description
- Use when Windows npm run, npm test, npm run build, or npm run-script exits before running the script with ERR_INVALID_ARG_TYPE, "file argument must be of type string", missing ComSpec, broken script-shell, stripped CLI flags, sandboxed npm cache/log EPERM, or silent npm script output.
- License
- Apache-2.0
- Instructions
- 71 lines in SKILL.md · view on GitHub
Files (1)
- SKILL.md
SKILL.md (first lines)
# Windows Npm Run Script Shell ## Overview Windows npm scripts need a shell. If `ComSpec` is missing or npm cannot infer a script shell, `npm run ...` can fail inside npm before `tsc`, Vite, Vitest, or Playwright actually runs. ## Triage Use this flow before changing app code: 1. Run the target tool directly with `npx`, for example `npx tsc -b --pretty false`, `npx vite build`, or `npx vitest run`. 2. Run `npm run <script> --loglevel verbose`. 3. Open the npm debug log if output is empty. 4. Check shell config: ```powershell npm config get script-shell npm config get cache npm config get update-notifier Write-Host "ComSpec=[$env:ComSpec]" Write-Host "SHELL=[$env:SHELL]" ``` If direct `npx` commands pass but `npm run` fails with `ERR_INVALID_ARG_TYPE: The "file" argument must be of type string. Received undefined`, treat it as npm shell configuration, not a project build failure. If direct `node <script>` succeeds but `npm test`/`npm run` exits silently in a sandbox, rerun with `--loglevel verbose`. When npm reports `EPERM` creating `%LocalAppData%\npm-cache\_logs` or attempts registry access only for update checks, treat it as npm runtime side effects, not a test failure. ## Fix Prefer a project-local `.npmrc` so the fix travels with the repo: ```ini script-shell=C:\Windows\System32\cmd.exe ``` For sandboxed Windows workspaces where npm cannot write the user cache/log directory, keep npm side effects inside the repo and disable network-prone notices: ```ini cache=.npm-cache update-notifier=false fund=false audit=false script-shell=cmd.exe ``` Then rerun: ```powershell npm run build npm test -- --run ``` If the project requires PowerShell syntax in scripts, set `script-shell` to PowerShell and avoid `&&` in package scripts, because Windows PowerShell 5 does not support `&&`. ## Common Mistakes - Do not rewrite TypeScript, Vite, Vitest, or React code when `npx <tool>` succeeds and only `npm run` fails. - Do not treat silent npm output as proof that the build tool produced no diagnostics; inspect the npm debug log. - Do not ignore npm cache/log `EPERM` in sandboxed workspaces; set a project-local cache before escalating. - Do not set a global npm config unless the user asked for machine-wide changes. - Do not assume `SHELL` replaces `ComSpec` for npm on Windows. ## Completion Standard The issue is fixed only when: - The original `npm run <script>` command succeeds. - The direct tool command still succeeds. - Tests/builds that previously passed via `npx` also pass through npm scripts.
From JinNing6/Noosphere, Apache-2.0.
More from JinNing6/Noosphere
- 0.643score
Noosphere
JinNing6
Community of Consciousness MCP Server — upload and explore collective wisdom via GitHub.
ConnectorAFreshness: ALocal★ 18↓ 71/wkClaude Code +5 - 0.602score
agent-debug-memory
JinNing6
Use when debugging code, tests, builds, deployments, CI failures, runtime errors, framework issues, API migrations, or UI state bugs where a coding Agent…
SkillBFreshness: B★ 18Claude Code +9 - 0.602score
debug-async-ui
JinNing6
Use when UI state or returned content disappears, flashes, rolls back, saves but loses state, menus fail intermittently, or real browser behavior differs from…
SkillBFreshness: B★ 18Claude Code +9 - 0.602score
browser-actionability-debug
JinNing6
Diagnose browser UI tests or real browser checks where an element appears visible but cannot be clicked, copied, hovered, or focused.
SkillBFreshness: B★ 18Claude Code +9 - 0.602score
cloudflare-pages-stale-assets
JinNing6
Diagnose and fix Cloudflare Pages deployments where the live site still shows old CSS, JavaScript, native controls, untranslated text, or stale UI after a…
SkillBFreshness: B★ 18Claude Code +9 - 0.602score
codex-project-recency-sort-recovery
JinNing6
Diagnose and resolve codex project recency sort failures.
SkillBFreshness: B★ 18Claude Code +9 - 0.602score
binary-credential-format-boundary
JinNing6
Audit and repair readers for fixed-length binary credentials and their text encodings without mutating raw bytes.
SkillBFreshness: B★ 18Claude Code +9 - 0.602score
docker-git-bind-mount-push-debug
JinNing6
Diagnose and validate Git commit, fetch, and push failures when worktrees or bare remotes are bind-mounted into Docker, especially on Docker Desktop for…
SkillBFreshness: B★ 18Claude Code +9 - 0.602score
dynamic-shared-skills
JinNing6
Use when an engineering task may match a community-reviewed Noosphere workflow and the Agent should discover, verify, apply, update, or report the outcome of…
SkillBFreshness: B★ 18Claude Code +9 - 0.602score
fastapi-response-contract-boundary
JinNing6
Audit and fix FastAPI/Pydantic response contract failures and analytics metric drift.
SkillBFreshness: B★ 18Claude Code +9 - 0.602score
frontend-layering-specificity-debug
JinNing6
Diagnose and fix frontend controls whose typography or dimensions ignore component CSS, and React Three Fiber/Drei projected HTML labels that paint above…
SkillBFreshness: B★ 18Claude Code +9 - 0.602score
using-noosphere
JinNing6
Use automatically before diagnosing or fixing a concrete software failure.
SkillBFreshness: B★ 18Claude Code +9
Signals
- Stars
- 18
- Forks
- 3
- Open issues
- 23
- Last commit (this folder)
- Jul 15, 2026 (3 months ago)
- Last release
- Jul 29, 2026 (3 months ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- Apache-2.0
- Repository
- github.com/JinNing6/Noosphere
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
More from JinNing6
- 0.643score
Noosphere
JinNing6
Community of Consciousness MCP Server — upload and explore collective wisdom via GitHub.
ConnectorAFreshness: ALocal★ 18↓ 71/wkClaude Code +5 - 0.602score
using-noosphere
JinNing6
Use automatically before diagnosing or fixing a concrete software failure.
SkillBFreshness: B★ 18Claude Code +9 - 0.602score
agent-debug-memory
JinNing6
Use when debugging code, tests, builds, deployments, CI failures, runtime errors, framework issues, API migrations, or UI state bugs where a coding Agent…
SkillBFreshness: B★ 18Claude Code +9 - 0.602score
binary-credential-format-boundary
JinNing6
Audit and repair readers for fixed-length binary credentials and their text encodings without mutating raw bytes.
SkillBFreshness: B★ 18Claude Code +9 - 0.602score
browser-actionability-debug
JinNing6
Diagnose browser UI tests or real browser checks where an element appears visible but cannot be clicked, copied, hovered, or focused.
SkillBFreshness: B★ 18Claude Code +9 - 0.602score
cloudflare-pages-stale-assets
JinNing6
Diagnose and fix Cloudflare Pages deployments where the live site still shows old CSS, JavaScript, native controls, untranslated text, or stale UI after a…
SkillBFreshness: B★ 18Claude Code +9
Cite this page
windows-npm-run-script-shell skill. Agent Mart. https://agentmart.dev/skills/jinning6-windows-npm-run-script-shell (last updated 2026-10-24)