meolu / walle-web

walle - 瓦力 Devops开源项目代码部署平台
https://walle-web.io
Apache License 2.0
11.85k stars 2.76k forks source link

BUG 添加高级任务 /usr/local/node/bin/npm install 报错 #928

Open laoono opened 5 years ago

laoono commented 5 years ago

问题描述 高级任务,添加node报错,直接在机器上执行命令是ok,

/usr/bin/env: ‘node’: No such file or directory

日志堆栈贴上来。 logs/runtime.log

2019-05-28 13:58:16,940 ERROR /var/www/code/walle-web/walle/service/deployer.py 507 deployer.walle_deploy /usr/bin/env: ‘node’: No such file or directory Traceback (most recent call last): File "/var/www/code/walle-web/walle/service/deployer.py", line 498, in walle_deploy self.prev_release(self.connections[self.task_id]) File "/var/www/code/walle-web/walle/service/deployer.py", line 253, in prev_release self.prev_release_custom(waller) File "/var/www/code/walle-web/walle/service/deployer.py", line 265, in prev_release_custom result = waller.run(command, wenv=self.config()) File "/var/www/code/walle-web/walle/service/waller.py", line 128, in run raise e Exception: /usr/bin/env: ‘node’: No such file or directory

runtime...

logs/error.log

2019-05-28 13:58:16,940 ERROR /var/www/code/walle-web/walle/service/deployer.py 507 deployer.walle_deploy /usr/bin/env: ‘node’: No such file or directory
Traceback (most recent call last):
  File "/var/www/code/walle-web/walle/service/deployer.py", line 498, in walle_deploy
    self.prev_release(self.connections[self.task_id])
  File "/var/www/code/walle-web/walle/service/deployer.py", line 253, in prev_release
    self.prev_release_custom(waller)
  File "/var/www/code/walle-web/walle/service/deployer.py", line 265, in prev_release_custom
    result = waller.run(command, wenv=self.config())
  File "/var/www/code/walle-web/walle/service/waller.py", line 128, in run
    raise e
Exception: /usr/bin/env: ‘node’: No such file or directory

运行环境

AngelOver commented 5 years ago

sudo cnpm i 关键加sudo