Home > Mobile >  How to enable npm-check?
How to enable npm-check?

Time:03-29

I am having a problem with the package I installed. The npm-check. I already install it globally, and when I try to run npm-check it says npm-check.ps1 cannot be loaded because running scripts is disabled on this system.error message

I did try to go to the link provided https:/go.microsoft.com/fwlink/?LinkID=135170. And watch some tutorials. But I was afraid because it involves the registry.

CodePudding user response:

To run npm check here, you would need to run /path/to/.bin/npm-check

If you wan to run from npm-check you must need to installed it globally first.

npm install -g npm-check

CodePudding user response:

If you're using Windows Server 2008 R2 then there is an x64 and x86 version of PowerShell both of which have to have their execution policies set. Did you set the execution policy on both hosts?

As an Administrator, you can set the execution policy by typing this into your PowerShell window:

Set-ExecutionPolicy RemoteSigned

For more information, see Using the Set-ExecutionPolicy Cmdlet.

When you are done, you can set the policy back to its default value with:

Set-ExecutionPolicy Restricted

You may see an error:

Access to the registry key
'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\PowerShell\1\ShellIds\Microsoft.PowerShell' is denied. 
To change the execution policy for the default (LocalMachine) scope, 
  start Windows PowerShell with the "Run as administrator" option. 
To change the execution policy for the current user, 
  run "Set-ExecutionPolicy -Scope CurrentUser".

So you may need to run the command like this (as seen in comments):

Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
  • Related