nodemon : 无法将“nodemon”项识别为 cmdlet、函数、脚本文件或可运行程序的名称

281 阅读1分钟

nodemon : 无法将“nodemon”项识别为 cmdlet、函数、脚本文件或可运行程序的名称

  • 原因:终端没有这个运行环境
  • 我的解决方法:
  1. 用管理员身份打开vscode
  2. 使用cmd终端
  3. 全局安装nodemon npm install nodemon -g
  4. 执行 nodemon .\indx.js

image.png

  • vscode设置默认终端
  1. 点击展开列表,选择Command Prompt(cmd)
  2. 默认是PowerShell

image.png