PKG软件包不包括所有文件

发布于 2025-02-03 19:11:18 字数 446 浏览 3 评论 0原文

我有node.js应用。我安装了pkg以创建可以在任何平台上运行的可执行文件。我为此使用pkg。命令。问题是我很少有csv文件和config.json文件我存储所有设置。它们都在/settings/文件夹中。问题在于它们不包含在pkg软件包中,并且在尝试运行它后会出现错误。我尝试添加

 "assets": [
      "settings/*",
      "settings/**/*"
    ]

package.json文件中,但它不起作用。如何在/settings/文件夹中添加所有文件,以便在没有任何错误的情况下将它们包含在执行文件中?

I have node.js app. I installed pkg to create executable file that can be run on any platform. I use pkg . command for it. The problem is I have few csv files and config.json file where I store all of my settings. They are all in /settings/ folder. The problem is that they are not included in the pkg package and I get error after trying to run it. I tried to add

 "assets": [
      "settings/*",
      "settings/**/*"
    ]

into package.json file but it didn't work. How can I add all files that are in the /settings/ folder so they are also included in the executive file without any errors?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文