QueryList-Puppeteer
QueryList-Puppeteer copied to clipboard
报错ProcessFailedException
源码 `<?php namespace app\controller;
use app\BaseController; use QL\QueryList; use QL\Ext\Chrome;
class Index extends BaseController { public function index() { $ql = QueryList::getInstance();
// 注册插件,默认注册的方法名为: chrome
$ql->use(Chrome::class);
// 抓取的目标页面是使用Vue.js动态渲染的页面
$text = $ql->chrome('https://www.iviewui.com/components/button')->find('h1')->text();
print_r($text);
}`
报错信息: #0 [0]ProcessFailedException in ProcessSupervisor.php line 309 ` if (!empty($process->getErrorOutput())) { if (IdleTimeoutException::exceptionApplies($process)) { throw new IdleTimeoutException( $this->options['idle_timeout'], new NodeFatalException($process, $this->options['debug']) ); } else if (NodeFatalException::exceptionApplies($process)) { throw new NodeFatalException($process, $this->options['debug']); } elseif ($process->isTerminated() && !$process->isSuccessful()) { throw new ProcessFailedException($process); } }
if ($process->isTerminated()) {
throw new Exceptions\ProcessUnexpectedlyTerminatedException($process);
}
}
` 框架用的是TP6,php版本是7.3.4,node版本是8.17,请问这个问题怎么解决
宝塔面板/www/wwwroot/www.xxxx.com/vendor/nesk/rialto/src/ProcessSupervisor.php 'executable_path' => '/www/server/nvm/versions/node/v14.15.1/bin/node',