Coder Social home page Coder Social logo

Comments (4)

CodingBear-Git avatar CodingBear-Git commented on June 24, 2024

@damms005
Hello! I also encountered this. This error occurs because you are developing on a PC running Linux. When you run the npm install sqlite3 command, a build only for Linux OS is installed in the \node_modules\sqlite3\lib\binding directory.
For me, the solution was to manually download builds (here: https://github.com/TryGhost/node-sqlite3/releases/tag/v5.1.6) for other OS (windows for example) and upload them here: \node_modules\sqlite3\ lib\binding
For example:
\node_modules\sqlite3\lib\binding\napi-v6-linux-musl-x64
\node_modules\sqlite3\lib\binding\napi-v6-win32-unknown-x64

But this solution only works for version 5.1.6 and below. This doesn't work in version 5.1.7. I created an issue about this here #1754

I hope I helped somehow, good luck!

from node-sqlite3.

damms005 avatar damms005 commented on June 24, 2024

Thanks for the clarification, @CodingBear-Git. I thought as much, but I do not have any proof or read about it anywhere.

Two questions:

  1. Per the manual download you explained, does it mean you were downloading binaries in code at runtime?
  2. Do you think this cross-platform compatibility is what @lovell is talking about here: lovell/sharp#3985 (comment) ?

from node-sqlite3.

CodingBear-Git avatar CodingBear-Git commented on June 24, 2024

@damms005

  1. I have a node js application. I'm using https://github.com/vercel/pkg to make a binary file (For example, .exe for Windows). When I create a binary, my node_modules directory is included in the file. And inside node_modules there are already sqlite3 assemblies for all the systems that I support.
  2. I think not, but I'm not sure. I don't have much experience :)

from node-sqlite3.

damms005 avatar damms005 commented on June 24, 2024

Thanks for your detailed response, @CodingBear-Git .

Per #1754, it seems you are also having this cross-platform issue.

I also evidently do not have very deep experience with Node.js.

However, it seems @lovell's comment that I posted above is a likely way out and I will update you here if I find anything worthwhile.

from node-sqlite3.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.