Warning Cannot include file %1 into executable - pkg error

955 Views Asked by At

I'm trying to build a notifications solution to update me in case any new jobs posted through Upwork

I built it with NodeJS but would like to share it with my friends

here's the link: https://github.com/frodoe7/upworkNotifier

It's just annoying for anyone to have a development environment to run this tool, and that's my problem

I'd like to bundle it and make it executable through the major platforms (MacOS-Linux-Windows)

I tried to use pkg as the most popular solution exist now

https://github.com/vercel/pkg

Here's the output after running pkg index.js

Targets not specified. Assuming: node16-linux-x64, node16-macos-x64, node16-win-x64

Warning Cannot include file %1 into executable. The file must be distributed with executable as %2. %1: node_modules/node-notifier/vendor/notifu/notifu.exe %2: path-to-executable/notifier/notifu.exe

Warning Cannot include file %1 into executable. The file must be distributed with executable as %2. %1: node_modules/node-notifier/vendor/notifu/notifu64.exe %2: path-to-executable/notifier/notifu64.exe

Warning Cannot include file %1 into executable. The file must be distributed with executable as %2. %1: node_modules/node-notifier/vendor/terminal-notifier.app/Contents/MacOS/terminal-notifier %2: path-to-executable/notifier/terminal-notifier

Warning Cannot include file %1 into executable. The file must be distributed with executable as %2. %1: node_modules/node-notifier/vendor/snoreToast/snoretoast-x64.exe %2: path-to-executable/notifier/snoretoast-x64.exe

Warning Cannot include file %1 into executable. The file must be distributed with executable as %2. %1: node_modules/node-notifier/vendor/snoreToast/snoretoast-x86.exe %2: path-to-executable/notifier/snoretoast-x86.exe

Warning Cannot include file %1 into executable. The file must be distributed with executable as %2. %1: node_modules/open/xdg-open %2: path-to-executable/xdg-open

Looks there's an issue between pkg and node-notifier package https://github.com/mikaelbr/node-notifier

A similar issue https://github.com/mikaelbr/node-notifier/issues/220#issuecomment-841725820

Anyone have any ideas how to fix that?

0

There are 0 best solutions below