使用命令行调用开发者工具BUG?
发布于 6 年前 作者 fangfan 5536 次浏览 来自 问答

系统是windows的,想用命令行去调用cli open,是用php文件去写的调用的代码如下

cd C:\Program Files (x86)\Tencent\微信web开发者工具 && cli open 2>&1

使用PHP去执行和单独在cmd去执行,都是成功调用,唯独外网调用这个文件会报错

 array:19 [▼
  0 => "net.js:282"
  1 => "    err = this._handle.open(fd);"
  2 => "                       ^"
  3 => ""
  4 => "Error: EINVAL: invalid argument, uv_pipe_open"
  5 => "    at new Socket (net.js:282:24)"
  6 => "    at process.getStdin [as stdin] (internal/process/stdio.js:85:19)"
  7 => "    at Object.<anonymous> (C:\Program Files (x86)\Tencent\微信web开发者工具\cli.js:1:6394)"
  8 => "    at n (C:\Program Files (x86)\Tencent\微信web开发者工具\cli.js:1:110)"
  9 => "    at C:\Program Files (x86)\Tencent\微信web开发者工具\cli.js:1:902"
  10 => "    at Object.<anonymous> (C:\Program Files (x86)\Tencent\微信web开发者工具\cli.js:1:912)"
  11 => "    at Module._compile (internal/modules/cjs/loader.js:776:30)"
  12 => "    at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)"
  13 => "    at Module.load (internal/modules/cjs/loader.js:643:32)"
  14 => "    at Function.Module._load (internal/modules/cjs/loader.js:556:12) {"
  15 => "  errno: -4071,"
  16 => "  code: 'EINVAL',"
  17 => "  syscall: 'uv_pipe_open'"
  18 => "}"

然后现在解决办法是不用官网的cli,直接把代码改成,cmd,本地,外网调用都是可用成功调用

cd C:\Program Files (x86)\Tencent\微信web开发者工具 && 微信开发者工具.exe 2>&1
1 回复

调用失败的是什么系统,工具版本是多少呢?

回到顶部