-
Notifications
You must be signed in to change notification settings - Fork 1k
pkg+sequelize+sqlite fails #141
Comments
Fixed in |
Yes, it looks like that fixed it and the build no longer throws an error. Thank you.
|
https://github.com/zeit/pkg/releases/tag/4.1.1 Fixed bug I reported: vercel/pkg#141
@grempe Did you ever distribute the resulting binary anywhere (move it to another machine or anything)? I'm having a terrible time with the sqlite package and portability. Even across identical machines running the same base images where I'm building on one and running on the other I'm getting the same: throw new Error('Please install sqlite3 package manually'); behavior I was seeing before 4.1.1. I'm just curious if you've seen this behavior at all and if you've done anything to resolve it. |
1 . Include |
@mawelsh We didn't. We were short on time, and it wasn't known if this issue was being addressed or not, and so we implemented and alternative local DB in our CLI client (NeDB), replacing Sequelize + sqlite3, which has worked well for us in testing so far and has no binary dependencies and so avoids these issues. I only tested that in my simple test case repository that the build seemed to work correctly now where before it did not. |
Thanks for the responses. It's in my package.json and installs locally. I'm beginning to assume the resulting binary sqlite3-lib that sqlite3 is building is non-portable. The pkg build runs fine as long as it's run from the folder it's created in, but after a bit more expirimentation copying it anywhere (even locally on the building machine) causes a failure. The full error I'm seeing is: so it looks like the pkg'd exe is looking in the right place (local to the exe) but sqlite3 is complaining for some reason. |
Do you distribute |
Thanks a bunch, I didn't totally understand what that note at the bottom of the readme was getting at. Adding a gulp task to go hunt down native add ons and copy them out to my release folder. Thanks for the help! |
Well, then i kindly ask you to rephrase that note. Please tell what idea the note lacks? What would you add for other users who face the same problem? |
Just user error on my part. I'm mostly an embedded developer that's been tossed into node recently. It's probably mostly on the sqlite3 maintainers not calling it out as a native module. I understood that sqlite was building its own sqlite-lib (to some extent their docs make it sound like if your system doesn't have sqlite3 installed/in the path it builds it but I'm not totally sure that's the case either) but didn't realize that was actually tied into node through a native module. New users to node may miss that basically any package that is calling itself a binding is probably a "native module" and will result in a .node file being built/pulled through gyp that needs to be included. |
Perhaps an example of what one would actually do (maybe use sqlite as the example) to resolve it to go along with the text in the readme. Its not clear to me how I would resolve that. |
portability : |
how do you do it 😢 |
I've created the following repository to be a simple test case you can run to see the issue I am having packaging up a simple app that makes use of Sequelize w/ a sqlite data store. Clone this repo for a working example of the errors we are seeing. Is it possible to make this work?
https://github.com/grempe/pkgtest
Here is a summary of the issue:
Bundle with
pkg
usingyarn build
throws warnings:Running the resultant executable throws the following errors:
Thanks very much for any guidance.
The text was updated successfully, but these errors were encountered: