【发布时间】:2018-12-12 23:17:33
【问题描述】:
我在本地机器上成功安装了 nodemon,但是当我运行代码时它给了我以下错误消息。
这是错误详情
The term 'nodemon' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
included, verify that the path is correct and try again.
At line:1 char:1
+ nodemon
+ ~~~~~~~
+ CategoryInfo : ObjectNotFound: (nodemon:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
【问题讨论】:
-
您是否正确安装了带有
-g标志的模块,并设置了路径环境变量? 编辑: 你也可以通过 NPM 使用命令。只需在 package.json 中使用您的命令创建一个脚本,并使用npm run scriptName调用您的脚本,模块可执行文件将从 node_modules 文件夹中“获取”。