在节点上生成pkg可执行文件时,不包括Phantomjs-prebuilt

问题描述

尝试使用pkg .生成可执行文件时,出现以下错误

pkg@4.4.9
> Targets not specified. Assuming:
  node12-linux-x64,node12-macos-x64,node12-win-x64
> Warning Cannot include file %1 into executable.
  The file must be distributed with executable as %2.
  %1: node_modules\phantom\lib\shim\index.js
  %2: path-to-executable/phantom/index.js
> Warning Cannot include file %1 into executable.
  The file must be distributed with executable as %2.
  %1: node_modules\phantom\lib\shim\function_bind_polyfill.js
  %2: path-to-executable/phantom/function_bind_polyfill.js
> Warning Cannot include file %1 into executable.
  The file must be distributed with executable as %2.
  %1: node_modules\phantom\lib\shim\index.js
  %2: path-to-executable/phantom/index.js
> Warning Cannot include file %1 into executable.
  The file must be distributed with executable as %2.
  %1: node_modules\phantom\lib\shim\function_bind_polyfill.js
  %2: path-to-executable/phantom/function_bind_polyfill.js
> Warning Cannot include file %1 into executable.
  The file must be distributed with executable as %2.
  %1: node_modules\phantomjs-prebuilt\lib\phantom\bin\phantomjs
  %2: path-to-executable/phantom/phantomjs
> Warning Cannot include file %1 into executable.
  The file must be distributed with executable as %2.
  %1: node_modules\phantomjs-prebuilt\lib\phantom\bin\phantomjs.exe
  %2: path-to-executable/phantom/phantomjs.exe
> Warning Cannot include file %1 into executable.
  The file must be distributed with executable as %2.
  %1: node_modules\phantomjs-prebuilt\lib\phantom\bin\phantomjs
  %2: path-to-executable/phantom/phantomjs
> Warning Cannot include file %1 into executable.
  The file must be distributed with executable as %2.
  %1: node_modules\phantomjs-prebuilt\lib\phantom\bin\phantomjs.exe
  %2: path-to-executable/phantom/phantomjs.exe

我无法正确运行没有pha​​ntomjs生成的可执行文件。该怎么解决?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...