Open Verequies opened 3 years ago
Can you share a repo that we can use to reproduce it? Though it seems like a usability issue rather than a tauri issue.
I'll quickly create a project you can test it with.
Here is a quick project I threw together: https://github.com/Verequies/tauri-pkg-test. Should be able to build it on Linux, macOS and Windows. Basically just spits the error from the backend sidecar into the Tauri window. It should look like this: The executable packaged with vercel/pkg only runs if the node_modules folder is next to the executable, but as you can see in the project I can only add that in resources which is not next to the executable.
A solution might be to offer the ability to run a script after generating the folders to be bundled, but right before bundling. For example running a script right before building the AppImage.
Another solution might be to offer an entry in tauri.conf.json for pkg in order to specify dependency files/folders.
I am currently bundling a Linux AppImage, macOS app and Windows msi off which includes has a sidecar that is compiled with vercel/pkg and utilises the library lovell/sharp.
During compilation of the sidecar executable I receive the following warnings:
In order for the executable to work properly I require the above directories in the resulting Tauri bundle next to the sidecar executable. Including the folder in the Tauri bundles resources does not work either.
At this point in time, I am not sure how to get this to work with Tauri, or if it is even possible.