我已经全局安装了 nodemon 模块(版本1.11.0)。
安装成功并且程序包存在于全局模块列表中,但 nodemon 命令在Powershell中返回以下错误:
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
当我尝试从其他全局安装的模块运行命令时会发生这种情况,因此似乎存在路径错误。
名称为 PATH 的用户变量的值为:
C:\Program Files\nodejs;C:\Users\Cal\AppData\Roaming\npm\node_modules;C:\Program Files\MongoDB\Server\3.4\bin
我的诊断是否正确,如果是,我哪里出错?