tsc : 无法加载文件 D:\\Program Files\\nodejs\\tsc.ps1,因为在此系统上禁止运行脚本。有关详细信息,请参阅 https:/go.microsoft.com/fwlink
/* 安装typescript npm install -g typescript (全局) 我们用 tsc 命令来编译它 tsc hello-world 接下来,需要创建一个以.ts 为扩展名的文件,比如 typescriptTest.ts */
报错
tsc : 无法加载文件 D:\Program Files\nodejs\tsc.ps1,因为在此系统上禁止运行脚本。有关详细信息,请参阅 https:/go.microsoft.com/fwlink
1.管理员身份运行vs code 2.在终端执行:get-ExecutionPolicy,显示Restricted 3.在终端执行:set-ExecutionPolicy RemoteSigned 4.在终端执行:get-ExecutionPolicy,显示RemoteSigned