Moosync / librespot-node

Node bindings for librespot
https://moosync.app/librespot-node/modules.html
MIT License
5 stars 1 forks source link

Failed librespot compiling on linux raspberry #1

Open jgabriel98 opened 4 months ago

jgabriel98 commented 4 months ago

It seems there are many missing dependencies:

image

Full error output:

``` npm ERR! code 2 npm ERR! path /home/pi/spotify-visualizer/server/node_modules/librespot-node npm ERR! command failed npm ERR! command sh -c npm run build-release && npm run declarations npm ERR! > librespot-node@1.1.2 build-release npm ERR! > npm run build -- --release npm ERR! npm ERR! npm ERR! > librespot-node@1.1.2 build npm ERR! > cargo-cp-artifact -a cdylib librespot-node dist/build/librespot.node -- cargo build --manifest-path=native/Cargo.toml --message-format=json-render-diagnostics --release npm ERR! npm ERR! npm ERR! > librespot-node@1.1.2 declarations npm ERR! > tsc --emitDeclarationOnly npm ERR! npm ERR! src/genericPlayer.ts(1,26): error TS7016: Could not find a declaration file for module 'events'. '/home/pi/spotify-visualizer/server/node_modules/events/events.js' implicitly has an 'any' type. npm ERR! Try `npm i --save-dev @types/events` if it exists or add a new declaration (.d.ts) file containing `declare module 'events';` npm ERR! src/tokenHandler.ts(1,20): error TS2307: Cannot find module 'assert' or its corresponding type declarations. npm ERR! src/tokenHandler.ts(2,26): error TS2307: Cannot find module 'fs' or its corresponding type declarations. npm ERR! src/tokenHandler.ts(3,37): error TS2307: Cannot find module 'fs/promises' or its corresponding type declarations. npm ERR! src/tokenHandler.ts(5,18): error TS2307: Cannot find module 'path' or its corresponding type declarations. npm ERR! src/utils.ts(1,39): error TS2307: Cannot find module 'https' or its corresponding type declarations. npm ERR! src/utils.ts(25,42): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. npm ERR! src/utils.ts(42,39): error TS7006: Parameter 'res' implicitly has an 'any' type. npm ERR! src/utils.ts(43,23): error TS7006: Parameter 'chunk' implicitly has an 'any' type. npm ERR! src/utils.ts(81,50): error TS2580: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. npm ERR! npm verb cli /usr/bin/node /usr/bin/npm npm ERR! npm info using npm@9.6.7 npm ERR! npm info using node@v18.17.1 npm ERR! npm verb title npm run build-release npm ERR! npm verb argv "run" "build-release" npm ERR! npm verb logfile logs-max:10 dir:/home/pi/.npm/_logs/2024-07-17T00_08_09_323Z- npm ERR! npm verb logfile /home/pi/.npm/_logs/2024-07-17T00_08_09_323Z-debug-0.log npm ERR! npm verb cli /usr/bin/node /usr/bin/npm npm ERR! npm info using npm@9.6.7 npm ERR! npm info using node@v18.17.1 npm ERR! npm verb title npm run build --release npm ERR! npm verb argv "run" "build" "--" "--release" npm ERR! npm verb logfile logs-max:10 dir:/home/pi/.npm/_logs/2024-07-17T00_08_10_204Z- npm ERR! npm verb logfile /home/pi/.npm/_logs/2024-07-17T00_08_10_204Z-debug-0.log npm ERR! warning: `default_features` is deprecated in favor of `default-features` and will not work in the 2024 edition npm ERR! (in the `futures-util` dependency) npm ERR! Compiling libc v0.2.149 npm ERR! Compiling autocfg v1.1.0 npm ERR! Compiling proc-macro2 v1.0.69 npm ERR! Compiling cfg-if v1.0.0 npm ERR! Compiling unicode-ident v1.0.12 npm ERR! Compiling spin v0.5.2 npm ERR! Compiling memchr v2.6.4 npm ERR! Compiling quote v1.0.33 npm ERR! Compiling once_cell v1.18.0 npm ERR! Compiling syn v2.0.38 npm ERR! Compiling log v0.4.20 npm ERR! Compiling jobserver v0.1.27 npm ERR! Compiling smallvec v1.11.1 npm ERR! Compiling hashbrown v0.14.2 npm ERR! Compiling cc v1.0.83 npm ERR! Compiling equivalent v1.0.1 npm ERR! Compiling adler v1.0.2 npm ERR! Compiling gimli v0.28.0 npm ERR! Compiling bytes v1.5.0 npm ERR! Compiling backtrace v0.3.69 npm ERR! Compiling indexmap v2.0.2 npm ERR! Compiling miniz_oxide v0.7.1 npm ERR! Compiling object v0.32.1 npm ERR! Compiling lock_api v0.4.11 npm ERR! Compiling parking_lot_core v0.9.9 npm ERR! Compiling fixedbitset v0.4.2 npm ERR! Compiling addr2line v0.21.0 npm ERR! Compiling pin-project-lite v0.2.13 npm ERR! Compiling rustc-demangle v0.1.23 npm ERR! Compiling petgraph v0.6.4 npm ERR! Compiling thread-id v4.2.1 npm ERR! Compiling scopeguard v1.2.0 npm ERR! Compiling typenum v1.17.0 npm ERR! Compiling version_check v0.9.4 npm ERR! Compiling generic-array v0.14.7 npm ERR! Compiling ring v0.16.20 npm ERR! Compiling futures-core v0.3.29 npm ERR! Compiling parking_lot v0.12.1 npm ERR! Compiling indexmap v1.9.3 npm ERR! Compiling thiserror v1.0.50 npm ERR! Compiling itoa v1.0.9 npm ERR! Compiling untrusted v0.7.1 npm ERR! Compiling tokio-macros v2.1.0 npm ERR! Compiling socket2 v0.5.5 npm ERR! Compiling mio v0.8.9 npm ERR! Compiling num_cpus v1.16.0 npm ERR! Compiling signal-hook-registry v1.4.1 npm ERR! Compiling slab v0.4.9 npm ERR! Compiling lazy_static v1.4.0 npm ERR! Compiling futures-task v0.3.29 npm ERR! Compiling futures-channel v0.3.29 npm ERR! Compiling futures-sink v0.3.29 npm ERR! Compiling bitflags v1.3.2 npm ERR! Compiling tokio v1.33.0 npm ERR! Compiling thiserror-impl v1.0.50 npm ERR! Compiling const-oid v0.9.5 npm ERR! Compiling futures-util v0.3.29 npm ERR! Compiling rustix v0.38.20 npm ERR! Compiling crypto-common v0.1.6 npm ERR! Compiling futures-macro v0.3.29 npm ERR! Compiling getrandom v0.2.10 npm ERR! Compiling pin-utils v0.1.0 npm ERR! Compiling futures-io v0.3.29 npm ERR! Compiling fnv v1.0.7 npm ERR! Compiling http v0.2.9 npm ERR! Compiling rand_core v0.6.4 npm ERR! Compiling pkg-config v0.3.27 npm ERR! Compiling ppv-lite86 v0.2.17 npm ERR! Compiling rand_chacha v0.3.1 npm ERR! Compiling block-buffer v0.10.4 npm ERR! Compiling httparse v1.8.0 npm ERR! Compiling openssl-probe v0.1.5 npm ERR! Compiling subtle v2.5.0 npm ERR! Compiling anyhow v1.0.75 npm ERR! Compiling digest v0.10.7 npm ERR! Compiling rand v0.8.5 npm ERR! Compiling tracing-core v0.1.32 npm ERR! Compiling hashbrown v0.12.3 npm ERR! Compiling libm v0.2.8 npm ERR! Compiling protobuf v3.3.0 npm ERR! Compiling tracing v0.1.40 npm ERR! Compiling num-traits v0.2.17 npm ERR! Compiling arrayvec v0.7.4 npm ERR! Compiling serde v1.0.189 npm ERR! Compiling bytemuck v1.14.0 npm ERR! Compiling linux-raw-sys v0.4.10 npm ERR! Compiling bitflags v2.4.1 npm ERR! Compiling symphonia-core v0.5.3 npm ERR! Compiling tokio-util v0.7.9 npm ERR! Compiling serde_derive v1.0.189 npm ERR! Compiling socket2 v0.4.10 npm ERR! Compiling try-lock v0.2.4 npm ERR! Compiling byteorder v1.5.0 npm ERR! Compiling base64 v0.21.5 npm ERR! Compiling tinyvec_macros v0.1.1 npm ERR! Compiling rustversion v1.0.14 npm ERR! Compiling httpdate v1.0.3 npm ERR! Compiling aho-corasick v1.1.2 npm ERR! Compiling tinyvec v1.6.0 npm ERR! Compiling want v0.3.1 npm ERR! Compiling h2 v0.3.21 npm ERR! Compiling protobuf-support v3.3.0 npm ERR! Compiling http-body v0.4.5 npm ERR! Compiling sct v0.6.1 npm ERR! Compiling cpufeatures v0.2.10 npm ERR! Compiling num-integer v0.1.45 npm ERR! Compiling encoding_rs v0.8.33 npm ERR! Compiling fastrand v2.0.1 npm ERR! Compiling zeroize v1.6.0 npm ERR! Compiling syn v1.0.109 npm ERR! Compiling percent-encoding v2.3.0 npm ERR! Compiling rustls v0.21.7 npm ERR! Compiling base64ct v1.6.0 npm ERR! Compiling either v1.9.0 npm ERR! Compiling regex-syntax v0.8.2 npm ERR! Compiling tower-service v0.3.2 npm ERR! Compiling home v0.5.5 npm ERR! Compiling which v4.4.2 npm ERR! Compiling hyper v0.14.27 npm ERR! Compiling regex-automata v0.4.3 npm ERR! Compiling pem-rfc7468 v0.7.0 npm ERR! Compiling form_urlencoded v1.2.0 npm ERR! Compiling tempfile v3.8.0 npm ERR! Compiling unicode-normalization v0.1.22 npm ERR! Compiling sct v0.7.0 npm ERR! Compiling webpki v0.21.4 npm ERR! Compiling rustls-webpki v0.101.6 npm ERR! Compiling unicode-bidi v0.3.13 npm ERR! Compiling base64 v0.13.1 npm ERR! Compiling powerfmt v0.2.0 npm ERR! Compiling deranged v0.3.9 npm ERR! Compiling rustls v0.19.1 npm ERR! Compiling protobuf-parse v3.3.0 npm ERR! Compiling idna v0.4.0 npm ERR! Compiling vergen v8.2.5 npm ERR! Compiling regex v1.10.2 npm ERR! Compiling der v0.7.8 npm ERR! Compiling symphonia-metadata v0.5.3 npm ERR! Compiling sha1 v0.10.6 npm ERR! Compiling num-iter v0.1.43 npm ERR! Compiling num_threads v0.1.6 npm ERR! Compiling time-core v0.1.2 npm ERR! Compiling time v0.3.30 npm ERR! Compiling spki v0.7.2 npm ERR! Compiling protobuf-codegen v3.3.0 npm ERR! Compiling url v2.4.1 npm ERR! Compiling rustls-pemfile v1.0.3 npm ERR! Compiling futures-executor v0.3.29 npm ERR! Compiling inout v0.1.3 npm ERR! Compiling vcpkg v0.2.15 npm ERR! Compiling ryu v1.0.15 npm ERR! Compiling num-bigint-dig v0.8.4 npm ERR! Compiling mime v0.3.17 npm ERR! Compiling openssl-sys v0.9.93 npm ERR! Compiling cipher v0.4.4 npm ERR! Compiling futures v0.3.29 npm ERR! Compiling rustls-native-certs v0.6.3 npm ERR! Compiling librespot-protocol v0.5.0-dev (https://github.com/librespot-org/librespot?branch=dev#054074c9) npm ERR! Compiling pkcs8 v0.10.2 npm ERR! Compiling tokio-rustls v0.24.1 npm ERR! Compiling rustls-native-certs v0.5.0 npm ERR! Compiling tokio-rustls v0.22.0 npm ERR! Compiling ct-logs v0.8.0 npm ERR! Compiling headers-core v0.2.0 npm ERR! Compiling priority-queue v1.3.2 npm ERR! Compiling num-bigint v0.4.4 npm ERR! Compiling utf-8 v0.7.6 npm ERR! Compiling serde_json v1.0.107 npm ERR! Compiling data-encoding v2.4.0 npm ERR! Compiling tungstenite v0.20.1 npm ERR! Compiling librespot-core v0.5.0-dev (https://github.com/librespot-org/librespot?branch=dev#054074c9) npm ERR! Compiling headers v0.3.9 npm ERR! Compiling hyper-rustls v0.22.1 npm ERR! Compiling pkcs1 v0.7.5 npm ERR! Compiling symphonia-utils-xiph v0.5.3 npm ERR! Compiling signature v2.1.0 npm ERR! Compiling hmac v0.12.1 npm ERR! Compiling alsa-sys v0.3.1 npm ERR! Compiling nonzero_ext v0.3.0 npm ERR! Compiling no-std-compat v0.4.1 npm ERR! Compiling futures-timer v3.0.2 npm ERR! Compiling governor v0.5.1 npm ERR! Compiling pbkdf2 v0.12.2 npm ERR! Compiling rsa v0.9.2 npm ERR! Compiling hyper-proxy v0.9.1 npm ERR! Compiling tokio-tungstenite v0.20.1 npm ERR! Compiling hyper-rustls v0.24.1 npm ERR! Compiling aes v0.8.3 npm ERR! Compiling num-derive v0.3.3 npm ERR! Compiling quick-xml v0.29.0 npm ERR! Compiling shannon v0.2.0 npm ERR! Compiling uuid v1.5.0 npm ERR! Compiling tokio-stream v0.1.14 npm ERR! Compiling sysinfo v0.29.10 npm ERR! Compiling hex v0.4.3 npm ERR! Compiling nix v0.24.3 npm ERR! Compiling memoffset v0.6.5 npm ERR! Compiling async-trait v0.1.74 npm ERR! Compiling foreign-types-shared v0.1.1 npm ERR! Compiling openssl v0.10.57 npm ERR! Compiling cpal v0.15.2 npm ERR! Compiling foreign-types v0.3.2 npm ERR! Compiling alsa v0.7.1 npm ERR! Compiling ctr v0.9.2 npm ERR! Compiling openssl-macros v0.1.1 npm ERR! Compiling neon-build v0.10.1 npm ERR! Compiling native-tls v0.2.11 npm ERR! Compiling dasp_sample v0.11.0 npm ERR! Compiling symphonia-codec-vorbis v0.5.3 npm ERR! Compiling symphonia-bundle-flac v0.5.3 npm ERR! Compiling symphonia-format-mkv v0.5.3 npm ERR! Compiling symphonia-format-ogg v0.5.3 npm ERR! Compiling symphonia-bundle-mp3 v0.5.3 npm ERR! Compiling symphonia-format-wav v0.5.3 npm ERR! Compiling symphonia-codec-pcm v0.5.3 npm ERR! Compiling symphonia-codec-adpcm v0.5.3 npm ERR! Compiling zerocopy-derive v0.6.5 npm ERR! Compiling match_cfg v0.1.0 npm ERR! Compiling hostname v0.3.1 npm ERR! Compiling zerocopy v0.6.5 npm ERR! Compiling symphonia v0.5.3 npm ERR! Compiling librespot-metadata v0.5.0-dev (https://github.com/librespot-org/librespot?branch=dev#054074c9) npm ERR! Compiling nix v0.23.2 npm ERR! Compiling rodio v0.17.3 npm ERR! Compiling librespot-audio v0.5.0-dev (https://github.com/librespot-org/librespot?branch=dev#054074c9) npm ERR! Compiling multimap v0.8.3 npm ERR! Compiling rand_distr v0.4.3 npm ERR! Compiling if-addrs v0.7.0 npm ERR! Compiling shell-words v1.1.0 npm ERR! Compiling librespot-playback v0.5.0-dev (https://github.com/librespot-org/librespot?branch=dev#054074c9) npm ERR! Compiling libmdns v0.7.5 npm ERR! Compiling neon v0.10.1 npm ERR! Compiling tokio-native-tls v0.3.1 npm ERR! Compiling is-terminal v0.4.9 npm ERR! Compiling syn-mid v0.5.4 npm ERR! Compiling rtoolbox v0.0.1 npm ERR! Compiling libloading v0.6.7 npm ERR! Compiling semver-parser v0.7.0 npm ERR! Compiling unicode-width v0.1.11 npm ERR! Compiling termcolor v1.3.0 npm ERR! Compiling humantime v2.1.0 npm ERR! Compiling env_logger v0.10.0 npm ERR! Compiling getopts v0.2.21 npm ERR! Compiling semver v0.9.0 npm ERR! Compiling neon-runtime v0.10.1 npm ERR! Compiling rpassword v7.2.0 npm ERR! Compiling neon-macros v0.10.1 npm ERR! Compiling hyper-tls v0.5.0 npm ERR! Compiling librespot-discovery v0.5.0-dev (https://github.com/librespot-org/librespot?branch=dev#054074c9) npm ERR! Compiling librespot-connect v0.5.0-dev (https://github.com/librespot-org/librespot?branch=dev#054074c9) npm ERR! Compiling serde_urlencoded v0.7.1 npm ERR! Compiling thread-id v3.3.0 npm ERR! Compiling ipnet v2.9.0 npm ERR! Compiling reqwest v0.11.22 npm ERR! Compiling simple-logging v2.0.2 npm ERR! Compiling librespot v0.5.0-dev (https://github.com/librespot-org/librespot?branch=dev#054074c9) npm ERR! Compiling librespot-node v0.1.0 (/home/pi/spotify-visualizer/server/node_modules/librespot-node/native) npm ERR! warning: unused variable: `s` npm ERR! --> src/canvaz.rs:940:17 npm ERR! | npm ERR! 940 | fn from_str(s: &str) -> Option { npm ERR! | ^ help: if this is intentional, prefix it with an underscore: `_s` npm ERR! | npm ERR! = note: `#[warn(unused_variables)]` on by default npm ERR! npm ERR! warning: `librespot-node` (lib) generated 1 warning npm ERR! Finished `release` profile [optimized] target(s) in 43m 55s npm ERR! npm verb exit 0 npm ERR! npm info ok npm ERR! npm verb exit 0 npm ERR! npm info ok npm ERR! npm verb cli /usr/bin/node /usr/bin/npm npm ERR! npm info using npm@9.6.7 npm ERR! npm info using node@v18.17.1 npm ERR! npm verb title npm run declarations npm ERR! npm verb argv "run" "declarations" npm ERR! npm verb logfile logs-max:10 dir:/home/pi/.npm/_logs/2024-07-17T00_52_10_837Z- npm ERR! npm verb logfile /home/pi/.npm/_logs/2024-07-17T00_52_10_837Z-debug-0.log npm ERR! npm verb exit 2 npm ERR! npm verb code 2 npm verb exit 2 npm verb unfinished npm timer reify 1721174877189 npm verb unfinished npm timer reify:build 1721174888517 npm verb unfinished npm timer build 1721174888519 npm verb unfinished npm timer build:deps 1721174888520 npm verb unfinished npm timer build:run:install 1721174888582 npm verb unfinished npm timer build:run:install:node_modules/librespot-node 1721174888583 npm verb code 2 npm ERR! A complete log of this run can be found in: /home/pi/.npm/_logs/2024-07-17T00_07_56_556Z-debug-0.log ```
Ovenoboyo commented 4 months ago

What's your node version and package manager version?

jgabriel98 commented 3 months ago

What's your node version and package manager version?

sorry for the wait.

node version is: v18.17.1 npm version is: 9.6.7

Ovenoboyo commented 3 months ago

Could you maybe try what the error message says? Try installing @types/node and @types/events from npm