Nodejs library error

I’m new to storj dcs, is the nodejs uplink library or api still supported. I followed their Documentation and github repo.

when I try npm install uplink-nodejs I get warnings that the library is no longer supported and lot of errors.

npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See There’s Math.random(), and then there’s Math.random() · V8 for details.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm ERR! code 1
npm ERR! path /home/abhith/storj1/node_modules/uplink-nodejs
npm ERR! command failed
npm ERR! command sh /tmp/install-b34cdc16.sh
npm ERR! make: Entering directory ‘/home/abhith/storj1/node_modules/uplink-nodejs/build’
npm ERR! CXX(target) Release/obj.target/uplink/libUplink.o
npm ERR! make: Leaving directory ‘/home/abhith/storj1/node_modules/uplink-nodejs/build’
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@7.1.2
npm ERR! gyp info using node@16.17.1 | linux | x64
npm ERR! gyp info find Python using Python version 3.10.6 found at “/usr/bin/python3”
npm ERR! (node:19662) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
npm ERR! (Use node --trace-deprecation ... to show where the warning was created)
npm ERR! gyp info spawn /usr/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args ‘/home/abhith/storj1/node_modules/node-gyp/gyp/gyp_main.py’,
npm ERR! gyp info spawn args ‘binding.gyp’,
npm ERR! gyp info spawn args ‘-f’,
npm ERR! gyp info spawn args ‘make’,
npm ERR! gyp info spawn args ‘-I’,
npm ERR! gyp info spawn args ‘/home/abhith/storj1/node_modules/uplink-nodejs/build/config.gypi’,
npm ERR! gyp info spawn args ‘-I’,
npm ERR! gyp info spawn args ‘/home/abhith/storj1/node_modules/node-gyp/addon.gypi’,
npm ERR! gyp info spawn args ‘-I’,
npm ERR! gyp info spawn args ‘/home/abhith/.cache/node-gyp/16.17.1/include/node/common.gypi’,
npm ERR! gyp info spawn args ‘-Dlibrary=shared_library’,
npm ERR! gyp info spawn args ‘-Dvisibility=default’,
npm ERR! gyp info spawn args ‘-Dnode_root_dir=/home/abhith/.cache/node-gyp/16.17.1’,
npm ERR! gyp info spawn args ‘-Dnode_gyp_dir=/home/abhith/storj1/node_modules/node-gyp’,
npm ERR! gyp info spawn args ‘-Dnode_lib_file=/home/abhith/.cache/node-gyp/16.17.1/<(target_arch)/node.lib’,
npm ERR! gyp info spawn args ‘-Dmodule_root_dir=/home/abhith/storj1/node_modules/uplink-nodejs’,
npm ERR! gyp info spawn args ‘-Dnode_engine=v8’,
npm ERR! gyp info spawn args ‘–depth=.’,
npm ERR! gyp info spawn args ‘–no-parallel’,
npm ERR! gyp info spawn args ‘–generator-output’,
npm ERR! gyp info spawn args ‘build’,
npm ERR! gyp info spawn args ‘-Goutput_dir=.’
npm ERR! gyp info spawn args ]
npm ERR! gyp info ok
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp@7.1.2
npm ERR! gyp info using node@16.17.1 | linux | x64
npm ERR! gyp info find Python using Python version 3.10.6 found at “/usr/bin/python3”
npm ERR! (node:19679) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
npm ERR! (Use node --trace-deprecation ... to show where the warning was created)
npm ERR! gyp info spawn /usr/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args ‘/home/abhith/storj1/node_modules/node-gyp/gyp/gyp_main.py’,
npm ERR! gyp info spawn args ‘binding.gyp’,
npm ERR! gyp info spawn args ‘-f’,
npm ERR! gyp info spawn args ‘make’,
npm ERR! gyp info spawn args ‘-I’,
npm ERR! gyp info spawn args ‘/home/abhith/storj1/node_modules/uplink-nodejs/build/config.gypi’,
npm ERR! gyp info spawn args ‘-I’,
npm ERR! gyp info spawn args ‘/home/abhith/storj1/node_modules/node-gyp/addon.gypi’,
npm ERR! gyp info spawn args ‘-I’,
npm ERR! gyp info spawn args ‘/home/abhith/.cache/node-gyp/16.17.1/include/node/common.gypi’,
npm ERR! gyp info spawn args ‘-Dlibrary=shared_library’,
npm ERR! gyp info spawn args ‘-Dvisibility=default’,
npm ERR! gyp info spawn args ‘-Dnode_root_dir=/home/abhith/.cache/node-gyp/16.17.1’,
npm ERR! gyp info spawn args ‘-Dnode_gyp_dir=/home/abhith/storj1/node_modules/node-gyp’,
npm ERR! gyp info spawn args ‘-Dnode_lib_file=/home/abhith/.cache/node-gyp/16.17.1/<(target_arch)/node.lib’,
npm ERR! gyp info spawn args ‘-Dmodule_root_dir=/home/abhith/storj1/node_modules/uplink-nodejs’,
npm ERR! gyp info spawn args ‘-Dnode_engine=v8’,
npm ERR! gyp info spawn args ‘–depth=.’,
npm ERR! gyp info spawn args ‘–no-parallel’,
npm ERR! gyp info spawn args ‘–generator-output’,
npm ERR! gyp info spawn args ‘build’,
npm ERR! gyp info spawn args ‘-Goutput_dir=.’
npm ERR! gyp info spawn args ]
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ ‘BUILDTYPE=Release’, ‘-C’, ‘build’ ]
npm ERR! In file included from …/functions/definitions.h:13,
npm ERR! from …/libUplink.h:5,
npm ERR! from …/libUplink.cc:6:
npm ERR! …/functions/…/libuplinkcversion.h:3:23: fatal error: …/libuplinkcv1.2.4.h: No such file or directory
npm ERR! 3 | #define UPLINKCHEADER “…/libuplinkcv1.2.4.h”
npm ERR! | ^~~~~~~~~~~~~~~~~~~~~~~
npm ERR! compilation terminated.
npm ERR! make: *** [uplink.target.mk:127: Release/obj.target/uplink/libUplink.o] Error 1
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: make failed with exit code: 2
npm ERR! gyp ERR! stack at ChildProcess.onExit (/home/abhith/storj1/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:513:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! gyp ERR! System Linux 5.15.0-52-generic
npm ERR! gyp ERR! command “/home/abhith/.nvm/versions/node/v16.17.1/bin/node” “/home/abhith/storj1/node_modules/.bin/node-gyp” “rebuild”
npm ERR! gyp ERR! cwd /home/abhith/storj1/node_modules/uplink-nodejs
npm ERR! gyp ERR! node -v v16.17.1
npm ERR! gyp ERR! node-gyp -v v7.1.2
npm ERR! gyp ERR! not ok

What version of node do you have installed?

node -v

Were there any error messages on the step below?

$ npm install -g node-gyp

Lastly what version of go do you have installed and is gobin configured?

go  version
go env

node - 16.17.1
go - go1.18.1
go env -
GO111MODULE=“”
GOARCH=“amd64”
GOBIN=“/home/abhith/go/bin”
GOCACHE=“/home/abhith/.cache/go-build”
GOENV=“/home/abhith/.config/go/env”
GOEXE=“”
GOEXPERIMENT=“”
GOFLAGS=“”
GOHOSTARCH=“amd64”
GOHOSTOS=“linux”
GOINSECURE=“”
GOMODCACHE=“/home/abhith/go/pkg/mod”
GONOPROXY=“”
GONOSUMDB=“”
GOOS=“linux”
GOPATH=“/home/abhith/go”
GOPRIVATE=“”
GOPROXY=“https://proxy.golang.org,direct”
GOROOT=“/usr/lib/go-1.18”
GOSUMDB=“sum.golang.org
GOTMPDIR=“”
GOTOOLDIR=“/usr/lib/go-1.18/pkg/tool/linux_amd64”
GOVCS=“”
GOVERSION=“go1.18.1”
GCCGO=“gccgo”
GOAMD64=“v1”
AR=“ar”
CC=“gcc”
CXX=“g++”
CGO_ENABLED=“1”
GOMOD=“/dev/null”
GOWORK=“”
CGO_CFLAGS=“-g -O2”
CGO_CPPFLAGS=“”
CGO_CXXFLAGS=“-g -O2”
CGO_FFLAGS=“-g -O2”
CGO_LDFLAGS=“-g -O2”
PKG_CONFIG=“pkg-config”
GOGCCFLAGS=“-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build828964125=/tmp/go-build -gno-rec
ord-gcc-switches”

Did you have any errors for this command:

npm install -g node-gyp

I tested installation of the package uplink-nodejs and did not have any problems.

$ docker run -it --rm golang:1.18 bash
# curl -fsSL https://deb.nodesource.com/setup_16.x | bash - &&\
apt-get install -y nodejs
# node -v
v16.18.1
# npm install -g node-gyp
npm WARN deprecated @npmcli/move-file@2.0.1: This functionality has been moved to @npmcli/fs

added 94 packages, and audited 95 packages in 3s

5 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
npm notice
npm notice New patch version of npm available! 8.19.2 -> 8.19.3
npm notice Changelog: https://github.com/npm/cli/releases/tag/v8.19.3
npm notice Run npm install -g npm@8.19.3 to update!
npm notice
# npm install -g npm

changed 19 packages, and audited 212 packages in 2s

11 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities
# npm install uplink-nodejs
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142

added 112 packages, and audited 113 packages in 28s

3 packages are looking for funding
  run `npm fund` for details

2 vulnerabilities (1 moderate, 1 high)

To address all issues, run:
  npm audit fix

Run `npm audit` for details.