1. 使用第三方node自动重启插件
官方网站为:nodemon
安装命令为:npm install -g nodemon
2、安装完成后,在启动nodemon时确出错,提示信息如下:
js文件名为: server.js
,
故启动命令为:nodemon server.js
。
简单概括为,无法加载文件,系统禁止运行此脚本。
此提示也同样出现在管理员权限运行vscode时。
3、解决方法:
在启动命令前加上命令:npx
例:npx nodemon server.js
。
出错提示及解决图片:
原文:https://www.cnblogs.com/Gray-pigeons/p/14753832.html