Deployment 使用pm2部署时的Windows问题

Deployment 使用pm2部署时的Windows问题,deployment,pm2,Deployment,Pm2,我已经阅读了一些关于如何在Windows机器下使用pm2的问题和想法,信不信由你,我以前的机器工作得很好。。。然后我不得不重新格式化它,完全忘记了我以前做过什么:( 我在npm之后安装了pm2,并使用命令:npm-installpm2@latest-g 对于部署和在windows命令行(cmd)下执行以下操作: pm2部署生产 但我总是得到: --> Deploying to production environment --> on host 10.200.73.136 Dep

我已经阅读了一些关于如何在Windows机器下使用pm2的问题和想法,信不信由你,我以前的机器工作得很好。。。然后我不得不重新格式化它,完全忘记了我以前做过什么:(

我在
npm
之后安装了
pm2
,并使用命令:
npm-installpm2@latest-g

对于部署和在windows命令行(
cmd
)下执行以下操作:

  • pm2部署生产
但我总是得到:

--> Deploying to production environment
--> on host 10.200.73.136
Deploy failed
Deploy failed
如果我使用git bash运行,会出现奇怪的git错误:

balex@DESKTOP-3LKNA7U  /d/Gavekortet/gogift-mainsite (master)
$ pm2 deploy production
--> Deploying to production environment
--> on host 10.200.73.136
      0 [main] sh 16020 C:\Program Files\Git\usr\bin\sh.exe: *** fatal error in forked process - fork: can't reserve memory for parent stack 0x600000 - 0x800000, (child has 0x400000 - 0x600000), Win32 error 487
    660 [main] sh 16020 cygwin_exception::open_stackdumpfile: Dumping stack trace to sh.exe.stackdump
      0 [main] sh 13588 fork: child -1 - forked process 16020 died unexpectedly, retry 0, exit code 0x100, errno 11
sh: fork: retry: No child processes
1007561 [main] sh 8808 C:\Program Files\Git\usr\bin\sh.exe: *** fatal error in forked process - fork: can't reserve memory for parent stack 0x600000 - 0x800000, (child has 0x400000 - 0x600000), Win32 error 487
1008780 [main] sh 8808 cygwin_exception::open_stackdumpfile: Dumping stack trace to sh.exe.stackdump
2266018 [main] sh 13588 fork: child -1 - forked process 8808 died unexpectedly, retry 0, exit code 0x100, errno 11
sh: fork: retry: No child processes
4274490 [main] sh 14924 C:\Program Files\Git\usr\bin\sh.exe: *** fatal error in forked process - fork: can't reserve memory for parent stack 0x600000 - 0x800000, (child has 0x400000 - 0x600000), Win32 error 487
4275199 [main] sh 14924 cygwin_exception::open_stackdumpfile: Dumping stack trace to sh.exe.stackdump
5799995 [main] sh 13588 fork: child -1 - forked process 14924 died unexpectedly, retry 0, exit code 0x100, errno 11
sh: fork: retry: No child processes
9804559 [main] sh 6320 C:\Program Files\Git\usr\bin\sh.exe: *** fatal error in forked process - fork: can't reserve memory for parent stack 0x600000 - 0x800000, (child has 0x400000 - 0x600000), Win32 error 487
9804986 [main] sh 6320 cygwin_exception::open_stackdumpfile: Dumping stack trace to sh.exe.stackdump
11142795 [main] sh 13588 fork: child -1 - forked process 6320 died unexpectedly, retry 0, exit code 0x100, errno 11
sh: fork: retry: No child processes
知道我遗漏了什么吗(我以前做过,但记不清具体是什么):(


另外,在我的Mac电脑上也有同样的步骤,可以完美地工作

我今天也遇到了同样的问题。请确保您拥有最新版本的pm2(撰写本文时为2.4.0)和Git Bash