-
Notifications
You must be signed in to change notification settings - Fork 12.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tsc.ps1 presence in %appdata%\npm #35031
Comments
Looks like the current npm version will include ps1 scripts after installing global packages. I am not sure where to report this to npm. Seems like my other machine also faced this issue after updating npm, which implies all npm global packages will not work by default on Powershell from now without mingling it's security settings. |
npm fixed it in 6.13.0 npm/cli#281 |
It is not about uninstalling though. It looks like everyone who is using Powershell(basically all Windows VSC terminal users)from now on needs to set the flag (RemoteSigned?) to use global npm packages. |
Ouch. Might want to report this behavior change in the npm/cli repository: https://github.com/npm/cli/issues |
Indeed - just for the heck of it I opened PowerShell just now: PS C:\Users\fatce> tsc
tsc : File C:\Users\fatce\AppData\Roaming\npm\tsc.ps1 cannot be loaded because running scripts is disabled on this
system. For more information, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
+ tsc
+ ~~~
+ CategoryInfo : SecurityError: (:) [], PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess Not very nice, and I use |
This issue has been marked as 'External' and has seen no recent activity. It has been automatically closed for house-keeping purposes. |
I had the same issue. Need to run PowerShell as Admin and set the execution policies. In Win10 updates PowerShell has some restrictions for outer scripts. I've set the rights to the policies, but it didn't worked. |
To fix it you have to run the command below to run Set-ExecutionPolicy and change the Execution Policy setting. |
Haiderlasne had the correct solution (but there was a subtle error)
|
The works for the current session, I just set mine for my local machine
|
I am not sure why there are ps1 files for tsc and tsserver and now I longer able to use tsc on PowerShell as I got the error
I tried to install tsc on my other Windows 10 machine, it does not come with ps1 files.
TypeScript Version: Version 3.7.2
Search Terms:
tsc.ps1
tsc.ps1 cannot be loaded because running scripts is disabled on this system
The text was updated successfully, but these errors were encountered: