[英]No able to run pm2 on Windows server 2012
我在 Windows server 2012 上安装了pm2
npm install pm2 -g
我关闭了我的 PowerShell 并再次打开它。
当我尝试运行pm2
失败并出现此错误
> pm2 list
pm2 : The term 'pm2' 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
+ pm2 list
+ ~~~
+ CategoryInfo : ObjectNotFound: (pm2:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
我注意到PM2_HOME
没有设置,所以我将它设置为我的主目录中的.pm2
,但这没有帮助
任何指针?
有趣的是,我让它在同一台机器上的另一个帐户上工作。
有 Bountysource 筹款使 PM2 与 Windows 兼容:
这意味着目前它并不完全兼容。
另请参阅此问题:
来自 Unitech 的评论:
PM2是一个生产模块,应该主要用在Linux服务器上。 除了Linux,我还没有在其他平台上尝试过。
只需在全局模式下安装 pm2
npm install pm2 -g -s
可以通过将 npm 的路径添加到 env 设置来解决该问题。 至少这对我有用。
这里如何解决它:
尝试再次执行。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.