问题描述
尝试使用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
我无法正确运行没有phantomjs生成的可执行文件。该怎么解决?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)