npm.ps1 Cannot Be Loaded
Fix npm.ps1 cannot be loaded by using npm.cmd or npx.cmd first, checking PowerShell execution policy, and avoiding unsafe Bypass or Unrestricted settings.
On this page
First, match npm.ps1 cannot be loaded
This page targets npm.ps1 cannot be loaded. The full message can contain a few extra words on different operating systems or Node.js versions, but the core error code or phrase should match.
npm.ps1 cannot be loadednpx.ps1 cannot be loadedrunning scripts is disabled on this systemnpm.ps1 cannot be loaded because running scripts is disablednpm.ps1 cannot be loaded / running scripts is disabledWhen searching or asking for help, copy the full error and remove API keys, private repository names, usernames and sensitive paths.
If PowerShell says npm.ps1 or npx.ps1 cannot be loaded because scripts are disabled, the fastest no-policy-change workaround is to use npm.cmd or npx.cmd. On a personal machine, you may instead review a CurrentUser RemoteSigned policy; managed-company policies can override it.
What npm.ps1 cannot be loaded means
Node and npm may already be installed. PowerShell selected the .ps1 command shim, but the current execution policy refused to run that script.
Common causes of npm.ps1 cannot be loaded
- PowerShell execution policy blocks local script shims.
- A company MachinePolicy or UserPolicy enforces stricter settings.
- The command resolves to npm.ps1 or npx.ps1 even though npm.cmd and npx.cmd are available.
Source trace for npm.ps1 cannot be loaded
These links are pinned to the 0.1.2-alpha.5 / 49a606b snapshot used for this page. They help separate npm.ps1 cannot be loaded from failures produced by Node.js, PowerShell, the operating-system network stack or filesystem permissions.
Fix npm.ps1 cannot be loaded
- 01
Confirm this is the exact error
This guide applies when the message names npm.ps1 or npx.ps1 and says that running scripts is disabled. If the command is simply not recognized, use the npm/npx PATH guide instead.
- 02
Use the no-policy-change workaround
Call the Windows .cmd shims directly. This is usually the safest immediate fix.
npm.cmd --version npx.cmd @deepseek-ai/dsh web - 03
Inspect the current policies
MachinePolicy or UserPolicy may be controlled by your organization.
Get-ExecutionPolicy -List - 04
Optional: change only the CurrentUser policy
On a personal computer, review this option before applying it. Close and reopen PowerShell afterward. If an organization policy is listed, follow your administrator's rules instead.
Set-ExecutionPolicy -Scope CurrentUser RemoteSigned - 05
Verify in a new PowerShell window
Open a new PowerShell window and confirm npm, npx and the DSH command work.
npm --version npx --version npx @deepseek-ai/dsh web
Verify npm.ps1 cannot be loaded is fixed
- npm.cmd and npx.cmd work even before a policy change.
- After an allowed CurrentUser change, npm and npx work in a new PowerShell window.
- DSH starts without the npm.ps1 cannot be loaded message.
- Do not set the policy to Unrestricted or Bypass as a blanket fix.
- Do not change MachinePolicy or UserPolicy on a managed computer.
- Do not run PowerShell as administrator merely to hide this error.
npm.ps1 cannot be loaded FAQ
How do I fix npm.ps1 cannot be loaded?
If PowerShell says npm.ps1 or npx.ps1 cannot be loaded because scripts are disabled, the fastest no-policy-change workaround is to use npm.cmd or npx.cmd. On a personal machine, you may instead review a CurrentUser RemoteSigned policy; managed-company policies can override it.
What does npm.ps1 cannot be loaded mean?
Node and npm may already be installed. PowerShell selected the .ps1 command shim, but the current execution policy refused to run that script.
How do I verify npm.ps1 cannot be loaded is fixed?
npm.cmd and npx.cmd work even before a policy change. After an allowed CurrentUser change, npm and npx work in a new PowerShell window. DSH starts without the npm.ps1 cannot be loaded message.
Checked against the official repository on 2026-09-03. Published version baseline: 0.1.1-rc.2; source snapshot: 0.1.2-alpha.5 (49a606b).
Official README · Verified source commit · GitHub Discussions