使用终端命令 npm -v
这里需要使用到npm npm node.js安装包自带
去官网 Node.js — Download下载对应版本安装
1.npm config set registry https://registry.npmmirror.com
2.npm install -g typescript
error:
npm notice
npm notice New minor version of npm available! 10.2.4 -> 10.3.0
npm notice Changelog: https://github.com/npm/cli/releases/tag/v10.3.0
npm notice Run npm install -g npm@10.3.0 to update!
npm notice
npm ERR! code EACCES
npm ERR! syscall mkdir
npm ERR! path /usr/local/lib/node_modules/typescript
npm ERR! errno -13
npm ERR! Error: EACCES: permission denied, mkdir '/usr/loca