mKeRix / room-assistant

Presence tracking and more for automation on the room-level
https://www.room-assistant.io
MIT License
1.27k stars 122 forks source link

Lots of errors on upgrade - don't know enough to know if this is a problem #756

Closed christianlappin closed 3 years ago

christianlappin commented 3 years ago

Describe the bug Followed directions for update and lots of errors occurred

To reproduce sudo npm i --global --unsafe-perm room-assistant

Relevant logs

pi@masterbedroom:~ $ sudo npm i --global --unsafe-perm room-assistant
npm WARN deprecated node-pre-gyp@0.17.0: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future
/opt/nodejs/bin/room-assistant -> /opt/nodejs/lib/node_modules/room-assistant/bin/room-assistant.js

> epoll@4.0.1 install /opt/nodejs/lib/node_modules/room-assistant/node_modules/epoll
> node-gyp rebuild

make: Entering directory '/opt/nodejs/lib/node_modules/room-assistant/node_modules/epoll/build'
  CXX(target) Release/obj.target/epoll/src/epoll.o
  SOLINK_MODULE(target) Release/obj.target/epoll.node
  COPY Release/epoll.node
make: Leaving directory '/opt/nodejs/lib/node_modules/room-assistant/node_modules/epoll/build'

> usb@1.7.1 install /opt/nodejs/lib/node_modules/room-assistant/node_modules/usb
> prebuild-install --runtime napi --target 4 --verbose || node-gyp rebuild

prebuild-install info begin Prebuild-install version 5.3.6
prebuild-install info looking for cached prebuild @ /root/.npm/_prebuilds/89a9c3-usb-v1.7.1-napi-v4-linux-arm.tar.gz
prebuild-install http request GET https://github.com/tessel/node-usb/releases/download/v1.7.1/usb-v1.7.1-napi-v4-linux-arm.tar.gz
prebuild-install http 200 https://github.com/tessel/node-usb/releases/download/v1.7.1/usb-v1.7.1-napi-v4-linux-arm.tar.gz
prebuild-install info downloading to @ /root/.npm/_prebuilds/89a9c3-usb-v1.7.1-napi-v4-linux-arm.tar.gz.624-24269b2535016.tmp
prebuild-install info renaming to @ /root/.npm/_prebuilds/89a9c3-usb-v1.7.1-napi-v4-linux-arm.tar.gz
prebuild-install info unpacking @ /root/.npm/_prebuilds/89a9c3-usb-v1.7.1-napi-v4-linux-arm.tar.gz
prebuild-install info unpack resolved to /opt/nodejs/lib/node_modules/room-assistant/node_modules/usb/build/Release/usb_bindings.node
prebuild-install info install Successfully installed prebuilt binary!

> @abandonware/bleno@0.5.1-4 install /opt/nodejs/lib/node_modules/room-assistant/node_modules/bleno
> node-gyp rebuild

make: Entering directory '/opt/nodejs/lib/node_modules/room-assistant/node_modules/bleno/build'
  SOLINK_MODULE(target) Release/obj.target/bleno.node
  COPY Release/bleno.node
make: Leaving directory '/opt/nodejs/lib/node_modules/room-assistant/node_modules/bleno/build'

> canvas@2.8.0 install /opt/nodejs/lib/node_modules/room-assistant/node_modules/canvas
> node-pre-gyp install --fallback-to-build

node-pre-gyp ERR! install response status 404 Not Found on https://github.com/Automattic/node-canvas/releases/download/v2.8.0/canvas-v2.8.0-node-v83-linux-glibc-arm.tar.gz
node-pre-gyp WARN Pre-built binaries not installable for canvas@2.8.0 and node@14.16.1 (node-v83 ABI, glibc) (falling back to source compile with node-gyp)
node-pre-gyp WARN Hit error response status 404 Not Found on https://github.com/Automattic/node-canvas/releases/download/v2.8.0/canvas-v2.8.0-node-v83-linux-glibc-arm.tar.gz
Package pixman-1 was not found in the pkg-config search path.
Perhaps you should add the directory containing `pixman-1.pc'
to the PKG_CONFIG_PATH environment variable
No package 'pixman-1' found
gyp: Call to 'pkg-config pixman-1 --libs' returned exit status 1 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/opt/nodejs/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
gyp ERR! System Linux 5.10.17+
gyp ERR! command "/opt/nodejs/bin/node" "/opt/nodejs/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/opt/nodejs/lib/node_modules/room-assistant/node_modules/canvas/build/Release/canvas.node" "--module_name=canvas" "--module_path=/opt/nodejs/lib/node_modules/room-assistant/node_modules/canvas/build/Release" "--napi_version=7" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v83"
gyp ERR! cwd /opt/nodejs/lib/node_modules/room-assistant/node_modules/canvas
gyp ERR! node -v v14.16.1
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/opt/nodejs/bin/node /opt/nodejs/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/opt/nodejs/lib/node_modules/room-assistant/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/opt/nodejs/lib/node_modules/room-assistant/node_modules/canvas/build/Release --napi_version=7 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/opt/nodejs/lib/node_modules/room-assistant/node_modules/canvas/node_modules/@mapbox/node-pre-gyp/lib/util/compile.js:89:23)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:1048:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:288:5)
node-pre-gyp ERR! System Linux 5.10.17+
node-pre-gyp ERR! command "/opt/nodejs/bin/node" "/opt/nodejs/lib/node_modules/room-assistant/node_modules/canvas/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /opt/nodejs/lib/node_modules/room-assistant/node_modules/canvas
node-pre-gyp ERR! node -v v14.16.1
node-pre-gyp ERR! node-pre-gyp -v v1.0.5
node-pre-gyp ERR! not ok
Failed to execute '/opt/nodejs/bin/node /opt/nodejs/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/opt/nodejs/lib/node_modules/room-assistant/node_modules/canvas/build/Release/canvas.node --module_name=canvas --module_path=/opt/nodejs/lib/node_modules/room-assistant/node_modules/canvas/build/Release --napi_version=7 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v83' (1)

> i2c-bus@5.2.2 install /opt/nodejs/lib/node_modules/room-assistant/node_modules/i2c-bus
> node-gyp rebuild

make: Entering directory '/opt/nodejs/lib/node_modules/room-assistant/node_modules/i2c-bus/build'
  CXX(target) Release/obj.target/i2c/src/i2c.o
  SOLINK_MODULE(target) Release/obj.target/i2c.node
  COPY Release/i2c.node
make: Leaving directory '/opt/nodejs/lib/node_modules/room-assistant/node_modules/i2c-bus/build'

> sd-notify@2.8.0 install /opt/nodejs/lib/node_modules/room-assistant/node_modules/sd-notify
> node-gyp rebuild

make: Entering directory '/opt/nodejs/lib/node_modules/room-assistant/node_modules/sd-notify/build'
  CXX(target) Release/obj.target/notify/notify.o
../notify.cc:5:10: fatal error: systemd/sd-daemon.h: No such file or directory
 #include <systemd/sd-daemon.h>
          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [notify.target.mk:107: Release/obj.target/notify/notify.o] Error 1
make: Leaving directory '/opt/nodejs/lib/node_modules/room-assistant/node_modules/sd-notify/build'
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/opt/nodejs/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
gyp ERR! System Linux 5.10.17+
gyp ERR! command "/opt/nodejs/bin/node" "/opt/nodejs/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /opt/nodejs/lib/node_modules/room-assistant/node_modules/sd-notify
gyp ERR! node -v v14.16.1
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok

> @nestjs/core@7.6.17 postinstall /opt/nodejs/lib/node_modules/room-assistant/node_modules/@nestjs/core
> opencollective || exit 0

                                                                                        Thanks for installing nest 🙏
                                                                               Please consider donating to our open collective
                                                                                      to help us maintain this package.

                                                                                          Number of contributors: 0
                                                                                            Number of backers: 567
                                                                                            Annual budget: $71,788
                                                                                           Current balance: $4,521

                                                                     👉  Become a partner: https://opencollective.com/nest/donate

> room-assistant@2.18.4 postinstall /opt/nodejs/lib/node_modules/room-assistant
> github-sponsors

                                                                                     Thanks for installing room-assistant
                                                                          Please consider donating to help us maintain this package.

                                                                                                  GitHub
                                                                           mKeRix: https://github.com/users/mKeRix/sponsorship
                                                                                                  Ko Fi
                                                                                         https://ko-fi.com/mkerix

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: xpc-connect@^2.0.0 (node_modules/room-assistant/node_modules/bleno/node_modules/xpc-connect):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for xpc-connect@2.0.0: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: canvas@2.8.0 (node_modules/room-assistant/node_modules/canvas):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: canvas@2.8.0 install: `node-pre-gyp install --fallback-to-build`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: sd-notify@2.8.0 (node_modules/room-assistant/node_modules/sd-notify):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: sd-notify@2.8.0 install: `node-gyp rebuild`
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1

+ room-assistant@2.18.4
added 5 packages from 4 contributors, removed 5 packages and updated 41 packages in 638.541s

Expected behavior Not so many errors?

Environment

mKeRix commented 3 years ago

The failing dependencies are marked as optional, so you don't need to worry about them unless you need a feature that requires them. In those cases you will find additional information on required packages in the documentation and also log messages that tell you what's going wrong.

In general, if the installation finishes successfully then the project can be used. Unfortunately these error messages can't be hidden easily in npm without losing other important information, even though I agree that it looks a bit confusing.