Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] Properly support nvm for Windows #3739

Open
JimiC opened this issue Jun 26, 2018 · 2 comments
Open

[Question] Properly support nvm for Windows #3739

JimiC opened this issue Jun 26, 2018 · 2 comments

Comments

@JimiC
Copy link
Contributor

JimiC commented Jun 26, 2018

What's going wrong?

pm2 does not properly support nvm for Windows

Specifically:

  • pm2 does not detect the enviromnent variable used by nvm for Windows
  • pm2 does not detect the correct path to where nvm for Windows keeps the node versions

How could we reproduce this issue?

  • Install nvm for Windows
  • Install a node version with nvm
  • Try to run an app using --interpreter node@x.x.x

Supporting information

$ pm2 report
[2018-06-26 14:55:39] PM2 log: ===============================================================================
[2018-06-26 14:55:39] PM2 log: --- New PM2 Daemon started ----------------------------------------------------
[2018-06-26 14:55:39] PM2 log: Time                 : Tue Jun 26 2018 14:55:39 GMT+0300 (GTB Daylight Time)
[2018-06-26 14:55:39] PM2 log: PM2 version          : 2.10.4
[2018-06-26 14:55:39] PM2 log: Node.js version      : 6.14.3
[2018-06-26 14:55:39] PM2 log: Current arch         : x64
[2018-06-26 14:55:39] PM2 log: PM2 home             : C:\Users\%user%\.pm2
[2018-06-26 14:55:39] PM2 log: PM2 PID file         : C:\Users\%user%\.pm2\pm2.pid
[2018-06-26 14:55:39] PM2 log: RPC socket file      : \\.\pipe\rpc.sock
[2018-06-26 14:55:39] PM2 log: BUS socket file      : \\.\pipe\pub.sock
[2018-06-26 14:55:39] PM2 log: Application log path : C:\Users\%user%\.pm2\logs
[2018-06-26 14:55:39] PM2 log: Process dump file    : C:\Users\%user%\.pm2\dump.pm2
[2018-06-26 14:55:39] PM2 log: Concurrent actions   : 2
[2018-06-26 14:55:39] PM2 log: SIGTERM timeout      : 1600
[2018-06-26 14:55:39] PM2 log: ===============================================================================
[2018-06-26 14:55:40] PM2 log: Starting execution sequence in -fork mode- for app name:app1 id:0
[2018-06-26 14:55:40] PM2 error: Error: spawn C:\Users\%user%\AppData\Roaming\nvm\versions\node\v6.14.3\bin\node ENOENT
    at exports._errnoException (util.js:1020:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:197:32)
    at onErrorNT (internal/child_process.js:376:16)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickDomainCallback (internal/process/next_tick.js:128:9)
[2018-06-26 14:55:40] PM2 log: Starting execution sequence in -fork mode- for app name:app2 id:1
[2018-06-26 14:55:40] PM2 error: Error: spawn C:\Users\%user%\AppData\Roaming\nvm\versions\node\v6.14.3\bin\node ENOENT
    at exports._errnoException (util.js:1020:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:197:32)
    at onErrorNT (internal/child_process.js:376:16)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickDomainCallback (internal/process/next_tick.js:128:9)
[2018-06-26 14:55:43] PM2 log: App name:app1 id:0 online
[2018-06-26 14:55:43] PM2 log: App name:app2 id:1 online
  • sensitive info has been obscured

Are you willing to support nvm for Windows? If so I can provide a PR with the necessary changes.

@wallet77
Copy link
Contributor

Hi @JimiC

We don't really support nvm for windows but if some basic changes can make pm2 compatible, a PR is welcome ;)

@JimiC
Copy link
Contributor Author

JimiC commented Jun 26, 2018

Great, I'll work on it and report back any findings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants