ts转js运行报错:“tsc : 无法加载文件
一、在typescript.ts转换成.js运行时报错解决办法:
1、第一步:鼠标在vscode软件上右击打开
属性–>兼容性–>以管理员的身份运行此程序,如下图:

2、第二步:打开vscode后,Shift+Ctrl+~ 打开终端,输入执行以下命令:
get-ExecutionPolicy
set-ExecutionPolicy RemoteSigned
get-ExecutionPolicy

3、最后再执行 tsc demo.ts就可以了。

转自链接:https://blog.csdn.net/weixin_45276056/article/details/112601071

浙公网安备 33010602011771号