如何解决在节点上生成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
我无法正确运行没有phantomjs生成的可执行文件。该怎么解决?
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。