Closed jordemort closed 2 years ago
The following steps to build the package work for me:
git clone https://github.com/phiresky/sql.js-httpvfs
cd sql.js-httpvfs
yarn install
cd sql.js
yarn install
yarn rebuild
cd ..
yarn build
Maybe the issue is that you didn't run npm install
in the sql.js directory? Alternatively, the issue might be that you used npm to install the dependencies and got versions that aren't compatible with each other (since npm ignores the yarn lock file). The dependencies (including sql.js) should be updated to the newest versions, but I'm not actively working on this project anymore.
In any case, I've released version 0.8.12 that should include the latest changes.
Alternatively, the issue might be that you used npm to install the dependencies and got versions that aren't compatible with each other (since npm ignores the yarn lock file).
I'll give it a shot; it's definitely most likely that I did something wrong. I am mostly a C programmer and when it comes to JS stuff I am usually just blindly throwing stuff at the wall.
I'm not actively working on this project anymore.
It's an extremely cool project; I picked it because all the pre-made "static site search" things I found seemed to need to download the entire index to work.
I think I was able to pull of a nasty little hack to avoid the problem of having to pull the whole index to sort by rank; instead of using fts5 and it's built-in ranking function, I use fts4 with no ranking function, and then wrap that up as a CTE and compute a rank after the data has been retrieved. My bogus "ranking function" seems to do a surprisingly good job: https://github.com/jordemort/jordemort.github.io/blob/main/src/search/client.ts
In any case, I've released version 0.8.12 that should include the latest changes.
Thank you!
I was trying to use the cache busting added in https://github.com/phiresky/sql.js-httpvfs/pull/21 and discovered that it isn't in the version of the module released on NPM.
I tried installing the module from the git repository instead, but because
package.json
lacks aprepare
script, it doesn't run the build process and installs an empty package.I tried adding a
prepare
script, so that I could install the module from the repo, but failed at it: https://github.com/phiresky/sql.js-httpvfs/compare/master...jordemort:npm-prepare?expand=1I don't really need to build the module myself, and would be perfectly content to consume an updated version from NPM, but failing that, I would appreciate some help in figuring out how to build it.
npm run build
(cd sql.js && npm run rebuild) ; npm run build
(cd sql.js && npm run rebuild) ; yarn run build
All three attempts ended in errors similar to: