在win10下面使用 pm2 启动出现错误
msooblog opened this issue · comments
msooblog commented
启动脚本:
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 环境下有什么好的解决方案
shynome commented
但是直接使用脚本启动又是正常的
blinksocks -c blc.json
这样是可以的
环境:
npm: 5.3.0
node: 8.1.4
pm2: 2.6.1
git: 2.12.2.windows.2
Micooz Lee commented
请说明Node.js版本号,最低要求v6以上。
shynome commented
已更新.
话说 github 居然是实时更新的.
Micooz Lee commented
这是pm2的bug,请暂时不要在Windows上使用pm2。