Closed frodoe7 closed 1 year ago
I got the same error with package "level": "^7.0.0"
Warning Cannot include directory %1 into executable. The directory must be distributed with executable as %2. %1: node_modules/leveldown/prebuilds %2: path-to-executable/prebuilds Warning Cannot include directory %1 into executable. The directory must be distributed with executable as %2. %1: node_modules/leveldown/prebuilds %2: path-to-executable/prebuilds
reading the output more carefully i was able to fix this issue.
i had to copy the prebuilds from %1: node_modules/leveldown/prebuilds
into my executable directory in the folder prebuilds
I have the same issue, also trying to use node-notifier
with pkg
OS: Windows 10 64bit
Node: 16.15.1
Output
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
apparently #1021. didn't fix this issue
I have the same error.
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
Any ideas ? I try to copy/paste the module in the exectuable folder... but nothing :/
For me same issue:
> pkg@5.8.0
> Targets not specified. Assuming:
node18-linux-arm64, node18-macos-arm64, node18-win-arm64
> Warning Cannot include directory %1 into executable.
The directory must be distributed with executable as %2.
%1: ../node_modules/puppeteer/.local-chromium
%2: path-to-executable/puppeteer
> Warning Failed to make bytecode node18-arm64 for file /snapshot/<PROJECT>/build/app.js
> Warning Failed to make bytecode node18-arm64 for file /snapshot/<PROJECT>/build/app.js
> Warning Failed to make bytecode node18-arm64 for file C:\snapshot\<PROJECT>\build\app.js
@MariuzM have you tried to copy /node_modules/puppeteer/.local-chromium into path-to-executable/puppeteer ?
i've got same error with sharp, and find no solution
can anyone have the solution? got the same issue with sharp.
Warning Cannot include directory %1 into executable. The directory must be distributed with executable as %2. %1: node_modules\sharp\build\Release %2: path-to-executable/sharp/build/Release
it is resolved. I am using caxa npm.
This issue is stale because it has been open 90 days with no activity. Remove the stale label or comment or this will be closed in 5 days. To ignore this issue entirely you can add the no-stale label
This issue is now closed due to inactivity, you can of course reopen or reference this issue if you see fit.
Try above
What version of pkg are you using?
5.7.0
What version of Node.js are you using?
16.14.0
What operating system are you using?
macOS
What CPU architecture are you using?
Quad-Core Intel Core i7
What Node versions, OSs and CPU architectures are you building for?
node16-linux-x64, node16-macos-x64, node16-win-x64
Describe the Bug
Here's the output after running pkg index.js
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?
Expected Behavior
To bundle the file correctly and show notifications from that package node-notifier
To Reproduce
Build a minimal project with node-notifier and try to run any notification
will work on the development environment, but after bundling with pkg, will fire these warnings and won't show any notifications