Example is broken
Opened this issue · 1 comments
Is anyone using WebThings anymore? I mean, this is a pretty fundamental building block and it won't build today.
I'm using Ubuntu 22.04.1 LTS, npm 8.19.2, node v16.18.1.
$ sqlite3 -version
3.37.2 2022-01-06 13:25:41 872ba256cbf61d9290b571c0e6d82a20c224ca3ad82971edc46b29818d5dalt1
Here's the tail of my build log....
979 timing build:link:node_modules/which Completed in 5ms
980 timing build:link Completed in 6ms
981 info run sqlite3@4.2.0 install node_modules/sqlite3 node-pre-gyp install --fallback-to-build
982 info run sqlite3@4.2.0 install { code: 1, signal: null }
983 timing reify:rollback:createSparse Completed in 269ms
984 timing reify:rollback:retireShallow Completed in 0ms
985 timing command:ci Completed in 2766ms
986 verbose stack Error: command failed
986 verbose stack at ChildProcess.<anonymous> (/snap/node/6895/lib/node_modules/npm/node_modules/@npmcli/promise-spawn/lib/index.js:63:27)
986 verbose stack at ChildProcess.emit (node:events:513:28)
986 verbose stack at maybeClose (node:internal/child_process:1100:16)
986 verbose stack at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5)
987 verbose pkgid sqlite3@4.2.0
988 verbose cwd /home/jkridner/workspace/ew2023-webthings-demo
989 verbose Linux 5.15.0-58-generic
990 verbose node v16.18.1
991 verbose npm v8.19.2
992 error code 1
993 error path /home/jkridner/workspace/ew2023-webthings-demo/node_modules/sqlite3
994 error command failed
995 error command sh -c -- node-pre-gyp install --fallback-to-build
996 verbose exit 1
997 timing npm Completed in 2845ms
998 verbose unfinished npm timer reify 1675307263886
999 verbose unfinished npm timer reify:build 1675307265346
1000 verbose unfinished npm timer build 1675307265346
1001 verbose unfinished npm timer build:deps 1675307265346
1002 verbose unfinished npm timer build:run:install 1675307265356
1003 verbose unfinished npm timer build:run:install:node_modules/sqlite3 1675307265356
1004 verbose code 1
1005 error A complete log of this run can be found in:
1005 error /home/jkridner/.npm/_logs/2023-02-02T03_07_42_889Z-debug-0.log
Hi @jadonk, welcome.
Is anyone using WebThings anymore? I mean, this is a pretty fundamental building block and it won't build today.
Yes they are. WebThings is maintained by a community of volunteers, please try to be respectful.
What are the steps to reproduce this error? What commands did you run?
I haven't personally used this example add-on before, but the linked blog post (which is now quite old) suggests cloning the repository into the add-ons directory of the gateway and restarting the gateway process so the gateway starts the add-on. Note that the latest version of WebThings Gateway still uses Node.js 10 and ships with a specific version of the gateway-addon-node package which is needed to run add-ons. If you're trying to run the add-on on its own that probably isn't going to work.
Also, the error you have shared looks like a problem with sqlite3, but that's not a dependency of this repository. It's possible the problem is not with this example, but some other code.
Please let us know the steps to reproduce this error so we can help further.
Edit: FWIW npm install
and npm build
ran for me without errors using Node.js 10, if they are the commands you were trying to run.