npx parcel index.html卡住不动的解决办法

问题

在看ts时,用parcel进行打包,运行ts代码。

npx parcel index.html

但是运行后发现程序卡住不动。

解决

解决办法是:修改npm镜像源。

(1) 查看镜像源

npm config get registry

(2) 修改为淘宝镜像源

npm config set registry https://registry.npm.taobao.org

(3) 重新执行命令

npx parcel index.html

(4) 正常运行

原文地址:https://www.cnblogs.com/buildnewhomeland/p/13578774.html