Node.js
安装 使用 nvm 安装(可以自由切换 node 版本) (1)下载并执行安装脚本 # curl curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash # 或者 wget wget -qO- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash (2)下载并使用指定版本的 node.js # 列出仓库中所有的 node 版本 $ nvm ls-remote # 安装指定版本 $ nvm install 8.11.1 # 使用已安装的某个版本 $ nvm use 8.11.1 # 查看当前使用的 node 版本 $ nvm -v (3)卸载指定版本的 node.js # 如果要卸载的版本是当前使用的版本,那么需要先停用它 $ nvm deactivate $ nvm uninstall 8.11.1 异步编程 callback promise async/await 排错 /usr/bin/env: node: No such file or directory (1)背景:执行 npm start 命令时出现上述错误。 (2)原因: npm 执行时默认使用 /usr