Error Running Alfred Workflow (node install related)

This is hardly an area of comfort for me; I’m getting an error in Alfred when running a JS workflow. I’ve included the debugger entries and the error messages that result when I try to use the npm commands in an attempt to fix the issue:

workflow:

[13:35:14.392] Search OmniFocus JS[Script Filter] Queuing argument ‘reminder’
[13:35:14.978] Search OmniFocus JS[Script Filter] Script with argv ‘reminder’ finished
[13:35:14.985] Search OmniFocus JS[Script Filter] {
“items”: [
{
“icon”: {
“path”: “/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/AlertStopIcon.icns”
},
“title”: “Unable to connect to OmniFocus database (The module ‘/opt/homebrew/lib/node_modules/alfred-search-omnifocus/node_modules/better-sqlite3/build/Release/better_sqlite3.node’\nwas compiled against a different Node.js version using\nNODE_MODULE_VERSION 108. This version of Node.js requires\nNODE_MODULE_VERSION 131. Please try re-compiling or re-installing\nthe module (for instance, using npm rebuild or npm install).)”,
“subtitle”: “/Users/stephenpower/Library/Group Containers/34YW5XSRB7.com.omnigroup.OmniFocus/com.omnigroup.OmniFocus3/com.omnigroup.OmniFocusModel/OmniFocusDatabase.db”
}

I tried the npm rebuild and npm install commands. This is what I got in terminal:

Last login: Mon Nov 11 10:38:54 on ttys000
stephenpower@MacBook-Pro-M1 ~ % npm rebuild
rebuilt dependencies successfully
stephenpower@MacBook-Pro-M1 ~ % npm install
npm error code ENOENT
npm error syscall open
npm error path /Users/stephenpower/package.json
npm error errno -2
npm error enoent Could not read package.json: Error: ENOENT: no such file or directory, open ‘/Users/stephenpower/package.json’
npm error enoent This is related to npm not being able to find a file.
npm error enoent

npm error A complete log of this run can be found in: /Users/stephenpower/.npm/_logs/2024-11-14T18_35_28_199Z-debug-0.log
stephenpower@MacBook-Pro-M1 ~ %