[英]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.