4

Quick disclaimer, it is easily googlable, but no matter where I search, I can't find a solution. This is why I'm trying here.

Okay, so the other day, I was trying to install the node package sqlite3, and it spat out errors all day long from the node-pre-gyp native module and from the node-gyp native module. I am using the latest LTS (as of 5/10/2018), and I can't get any answers on HOW TO FIX IT...! Please HALP ASAP!

Comments
  • 3
    Try to use yarn, it's useful when npm don't install the packages
  • 1
    @NotFound thank you so much, gonna try later. The thing is, I am trying to link SQLite3 to Angular. Is it going to work with Yarn?

    By the way, can ++ me? I want to add these up to get a sticker hopefully.
  • 2
    @OmerFlame Yarn works like NPM, you can also only use Yarn to install package then continue to use NPM. The only thing is that NPM and Yarn don't use the same package lock file.
  • 0
    @NotFound so, you mean the build tools are different?
  • 2
    @OmerFlame Yarn is a package installer for NodeJS, but the tools are nearly the same. It's just the commands and the lock file that are different.

    npm install => yarn
    npm init => yarn init
    npm install yourpackage => yarn add yourpackage
    npm run yourtask => yarn run yourtask or yarn yourtask

    Try yourself and see 😀
  • 0
    My God, thank you for helping.

    BTW, do you want to keep in touch? I can give you my email address.
  • 2
  • 0
    @OmerFlame @OmerFlame @CowBroRises I tried everything like that, there is a sign on the page of the SQLite3 package on NPM, that the build is failing. I tried installing the VS build tools and succeeded, but nothing worked. It can't resolve some native packages within NPM. It must be a problem with NPM, or node-pre-gyp installed incorrectly and corruptive, this is my best guess.
  • 0
    @CowBroRises I'm currently trying it. Looks like it hangs a bit on json-schema extracting. Gonna give a status update soon on the case.
  • 0
    UPDATE TO THE PROBLEM: I fixed most of the errors. It's very weird, but most of the packages are only built from package.json files. The thing is that this was the biggest problem, since there so many unresolved imports. So I fixed that, but now I face ANOTHER problem: every time I try to define a database on sqlite3 like this:

    const db = new sqlite3.Database('credentials.sqlite');

    It won't render ANYTHING after I write this. On the console, it says something about a proper compiler to handle a C# file inside node-gyp. After I remove the line above everything goes back to normal. Also, it says stuff about "critical package: the request for an import is an expression" errors. HELP I'M GOING NOWHERE WITH THIS PLEASE
  • 0
    ANOTHER UPDATE: I am declaring defeat on my desperate attempts on trying to compile the thing. This is the most frustrating moment in my life. According to the Git repo, it says it is compatible with maximum node 7.x and Angular 6 supports node 8 and higher ONLY. I simply give up.
  • 0
    @OmerFlame oh! version...
Add Comment