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

在win10下面使用 pm2 启动出现错误 #93

Closed
msooblog opened this issue Aug 22, 2017 · 4 comments
Closed

在win10下面使用 pm2 启动出现错误 #93

msooblog opened this issue Aug 22, 2017 · 4 comments

Comments

@msooblog
Copy link

msooblog commented Aug 22, 2017

启动脚本:

pm2 start blinksocks -- -c blc.json

错误信息:

[TAILING] Tailing last 15 lines for [blinksocks] process (change the value with --lines option)
C:\Users\shynome\.pm2\logs\blinksocks-out-1.log last 15 lines:
C:\Users\shynome\.pm2\logs\blinksocks-error-1.log last 15 lines:
1|blinksoc | C:\USERS\SHYNOME\APPDATA\ROAMING\NPM\BLINKSOCKS.CMD:1
1|blinksoc | (function (exports, require, module, __filename, __dirname) { @IF EXIST "%~dp0\node.exe" (
1|blinksoc |                                                               ^
1|blinksoc |
1|blinksoc | SyntaxError: Invalid or unexpected token
1|blinksoc |     at createScript (vm.js:74:10)
1|blinksoc |     at Object.runInThisContext (vm.js:116:10)
1|blinksoc |     at Module._compile (module.js:533:28)
1|blinksoc |     at Object.Module._extensions..js (module.js:580:10)
1|blinksoc |     at Module.load (module.js:503:32)
1|blinksoc |     at tryModuleLoad (module.js:466:12)
1|blinksoc |     at Function.Module._load (module.js:458:3)
1|blinksoc |     at Object.<anonymous> (C:\Users\shynome\AppData\Roaming\npm\node_modules\pm2\lib\ProcessContainerFork.js:70:21)
1|blinksoc |     at Module._compile (module.js:569:30)
1|blinksoc |     at Object.Module._extensions..js (module.js:580:10)

但是在 linux 下是没有问题的 , 所以我想问下在 win10 环境下有什么好的解决方案

@msooblog msooblog changed the title 在win10下面使用排名 在win10下面使用 pm2 启动出现错误 Aug 22, 2017
@shynome
Copy link

shynome commented Aug 22, 2017

但是直接使用脚本启动又是正常的

blinksocks -c blc.json

这样是可以的

环境:

npm: 5.3.0
node: 8.1.4
pm2: 2.6.1
git: 2.12.2.windows.2

@micooz
Copy link
Member

micooz commented Aug 22, 2017

请说明Node.js版本号,最低要求v6以上。

@shynome
Copy link

shynome commented Aug 22, 2017

已更新.
话说 github 居然是实时更新的.

@micooz
Copy link
Member

micooz commented Aug 22, 2017

这是pm2的bug,请暂时不要在Windows上使用pm2。

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

3 participants