npm : File C:\laragon\bin\nodejs\node-v18\npm.ps1 cannot be loaded because running scripts is disabled on this system
The error message (npm : File F:\laragon\bin\nodejs\node-v18\npm.ps1 cannot be loaded because running scripts is disabled on this system ) you're encountering suggests that running scripts is currently disabled on your system, which is preventing the execution of the npm command. This is a security feature in some environments to prevent the execution of potentially harmful scripts.
To resolve this issue, you can enable script execution by adjusting the PowerShell execution policy. Here's how you can do it:
1. Open a PowerShell window as an administrator.
2. Check the current execution policy by running the following command.
3. If the execution policy is set to Restricted, which is the default value, you'll need to change it to a less restrictive policy. To enable script execution, run the following command:
This command allows the execution of local scripts but requires downloaded scripts to be signed.
Now you should be able to use the npm command without encountering the "running scripts is disabled" error.
If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.
Don't forget to share this article! Help us spread the word by clicking the share button below.
We appreciate your support and are committed to providing you valuable and informative content.
We are thankful for your never ending support.