1、npm安装依赖报错:
npm ERR! code ENOTFOUND
npm ERR! syscall getaddrinfo
npm ERR! errno ENOTFOUND
npm ERR! network request to https://npm.aliyun.com/pbjs failed, reason: getaddrinfo ENOTFOUND npm.aliyun.com
npm ERR! network This is a problem related to network connectivity.
npm ERR! network In most cases you are behind a proxy or have bad network settings.
npm ERR! network
npm ERR! network If you are behind a proxy, please make sure that the
npm ERR! network 'proxy' config is set properly. See: 'npm help config'
执行:
npm config set proxy false
npm cache verify
2、利用tsc转的js无法直接在html中引入,命令改为:
tsc ceshi.ts --outDir ./js --module es6