在看ts时,用parcel进行打包,运行ts代码。
npx parcel index.html
但是运行后发现程序卡住不动。
解决办法是:修改npm镜像源。
(1) 查看镜像源
npm config get registry
(2) 修改为淘宝镜像源
npm config set registry https://registry.npm.taobao.org
(3) 重新执行命令
(4) 正常运行