Macos install of uplink-nodejs errors

I cannot solve build error at npm install stage. Can debug the issue have looked at mode, node-gyp, node-sass and python version issues.

gyp info spawn args [ ‘BUILDTYPE=Release’, ‘-C’, ‘build’ ]
make: *** No rule to make target /Users/user/Dropbox/PatientDirected.io/ptdir_admin/uplink-nodejs/libuplinkcv1.2.4.dylib', needed by /Users/user/Dropbox/PatientDirected.io/ptdir_admin/uplink-nodejs/build/Release/libuplinkcv1.2.4.dylib’. Stop.
gyp ERR! build error

Hello @tgiannulli,
Welcome to the forum!

What is architecture (hardware) on your Mac?

Please also post versions:

node -v
go version
gcc -v

Intel 64 bit

node -v v14.17.0
node-gyp -v v8.4.1
node-sass (throws binding error)
go version go1.20.3 darwin/amd64

dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 12.0.0 (clang-1200.0.32.29)

1 Like

Please post the command which you used to build/install and the whole stack trace.

user@TG-MacbookPro-2 ptdir_admin % npm install uplink-nodejs
npm WARN read-shrinkwrap This version of npm is compatible with lockfileVersion@1, but package-lock.json was generated for lockfileVersion@3. I’ll try to do my best with it!
npm WARN deprecated request@2.88.2: request has been deprecated, see github /request/request/issues/3142
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 v8.dev/blog/math-random for details.
npm WARN deprecated chokidar@1.7.0: Chokidar 2 will break on node v14+. Upgrade to chokidar 3 with 15x less dependencies.
npm WARN deprecated fsevents@1.2.13: The v1 package contains DANGEROUS / INSECURE binaries. Upgrade to safe fsevents v2
npm WARN deprecated source-map-resolve@0.5.3: See github /lydell/source-map-resolve#deprecated
npm WARN deprecated resolve-url@0.2.1: github /lydell/resolve-url#deprecated
npm WARN deprecated source-map-url@0.4.1: See github /lydell/source-map-url#deprecated
npm WARN deprecated urix@0.1.0: Please see github /lydell/urix#deprecated
npm WARN deprecated set-value@0.3.3: Critical bug fixed in v3.0.1, please upgrade to the latest version.
npm WARN deprecated set-value@0.2.0: Critical bug fixed in v3.0.1, please upgrade to the latest version.
npm WARN deprecated set-value@0.4.3: Critical bug fixed in v3.0.1, please upgrade to the latest version.
npm WARN deprecated core-js@2.6.12: core-js@<3.23.3 is no longer maintained and not recommended for usage due to the number of issues. Because of the V8 engine whims, feature detection in old core-js versions could cause a slowdown up to 100x even if nothing is polyfilled. Some versions have web compatibility issues. Please, upgrade your dependencies to the actual version of core-js.
npm WARN deprecated sourcemap-codec@1.4.8: Please use @jridgewell/sourcemap-codec instead
npm WARN deprecated @npmcli/move-file@2.0.1: This functionality has been moved to @npmcli/fs
npm WARN deprecated debug@4.1.1: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. ( github /visionmedia/debug/issues/797)
npm WARN deprecated circular-json@0.3.3: CircularJSON is in maintenance only, flatted is its successor.
npm WARN deprecated babel-preset-es2015@6.24.1: ?? Thanks for using Babel: we recommend using babel-preset-env now: please read babel-preset-es2015 -> babel-preset-env · Babel to update!
npm WARN deprecated gulp-util@3.0.8: gulp-util is deprecated - replace it, following the guidelines at medium /gulpjs/gulp-util-ca3b1f9f9ac5
npm WARN deprecated @npmcli/move-file@1.1.2: This functionality has been moved to @npmcli/fs
npm WARN deprecated request-promise@4.2.2: request-promise has been deprecated because it extends the now deprecated request package, see github /request/request/issues/3142
npm WARN deprecated request@2.87.0: request has been deprecated, see github /request/request/issues/3142
npm WARN deprecated har-validator@5.0.3: this library is no longer supported
npm WARN deprecated formidable@1.2.6: Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes: bit.ly/2ZEqIau
npm WARN rm not removing /Users/user/Dropbox/PatientDirected.io/ptdir_admin/node_modules/.bin/esparse as it wasn’t installed by /Users/user/Dropbox/PatientDirected.io/ptdir_admin/node_modules/esprima
npm WARN rm not removing /Users/user/Dropbox/PatientDirected.io/ptdir_admin/node_modules/.bin/esvalidate as it wasn’t installed by /Users/user/Dropbox/PatientDirected.io/ptdir_admin/node_modules/esprima

uplink-nodejs@1.2.6 preinstall /Users/user/Dropbox/PatientDirected.io/ptdir_admin/node_modules/uplink-nodejs
make

echo “Darwin”;
if [ ! -d uplink-c ]; then
git clone -b v1.2.2 github /storj/uplink-c;
fi;
if [ Darwin = Darwin ]; then
cd uplink-c;go build -o …/libuplinkcv1.2.4.dylib -buildmode=c-shared;mv .h …/;cd …/;cp ./libuplinkcv1.2.4. ./dist/;
fi;
if [ Darwin = Linux ]; then
cd uplink-c;go build -o …/libuplinkcv1.2.4.so -buildmode=c-shared;mv .h …/;cd …/;cp ./libuplinkcv1.2.4. ./dist/;
fi;
if test -d ./uplink-c; then rm -rf ./uplink-c; fi;
echo ’ \033[32m \n Successfully build \033[0m’;
Darwin
Cloning into ‘uplink-c’…
remote: Enumerating objects: 1330, done.
remote: Counting objects: 100% (209/209), done.
remote: Compressing objects: 100% (92/92), done.
remote: Total 1330 (delta 150), reused 145 (delta 117), pack-reused 1121
Receiving objects: 100% (1330/1330), 610.51 KiB | 2.38 MiB/s, done.
Resolving deltas: 100% (935/935), done.
Note: switching to ‘f6073cab8a5a9c548a5e8589593df08fbb3636c8’.

You are in ‘detached HEAD’ state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

git switch -c

Or undo this operation with:

git switch -

Turn off this advice by setting config variable advice.detachedHead to false

runtime/cgo

_cgo_export.c:3:10: fatal error: ‘stdlib.h’ file not found
cp: ./libuplinkcv1.2.4.*: No such file or directory

Successfully build

fsevents@1.2.13 install /Users/user/Dropbox/PatientDirected.io/ptdir_admin/node_modules/fsevents
node install.js

SOLINK_MODULE(target) Release/.node
ld: warning: dylib (/usr/local/lib/libc++.dylib) was built for newer macOS version (10.13) than being linked (10.10)
ld: warning: dylib (/usr/local/lib/libunwind.dylib) was built for newer macOS version (10.13) than being linked (10.10)
ld: warning: dylib (/usr/local/lib/libunwind.dylib) was built for newer macOS version (10.13) than being linked (10.10)
CXX(target) Release/obj.target/fse/fsevents.o
SOLINK_MODULE(target) Release/fse.node
ld: warning: dylib (/usr/local/lib/libc++.dylib) was built for newer macOS version (10.13) than being linked (10.10)
ld: warning: dylib (/usr/local/lib/libunwind.dylib) was built for newer macOS version (10.13) than being linked (10.10)
ld: warning: dylib (/usr/local/lib/libunwind.dylib) was built for newer macOS version (10.13) than being linked (10.10)

secp256k1@4.0.3 install /Users/user/Dropbox/PatientDirected.io/ptdir_admin/node_modules/secp256k1
node-gyp-build || exit 0

keccak@3.0.3 install /Users/user/Dropbox/PatientDirected.io/ptdir_admin/node_modules/keccak
node-gyp-build || exit 0

uplink-nodejs@1.2.6 install /Users/user/Dropbox/PatientDirected.io/ptdir_admin/node_modules/uplink-nodejs
(node-gyp configure) && (node-gyp rebuild)

make: *** No rule to make target /Users/user/Dropbox/PatientDirected.io/ptdir_admin/node_modules/uplink-nodejs/libuplinkcv1.2.4.dylib', needed by /Users/user/Dropbox/PatientDirected.io/ptdir_admin/node_modules/uplink-nodejs/build/Release/libuplinkcv1.2.4.dylib’. Stop.
gyp ERR! build error
gyp ERR! stack Error: make failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/user/.nvm/versions/node/v14.21.3/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack at ChildProcess.emit (events.js:314:20)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
gyp ERR! System Darwin 21.6.0
gyp ERR! command “/usr/local/bin/node” “/Users/user/.nvm/versions/node/v14.21.3/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” “rebuild”
gyp ERR! cwd /Users/user/Dropbox/PatientDirected.io/ptdir_admin/node_modules/uplink-nodejs
gyp ERR! node -v v12.22.12
gyp ERR! node-gyp -v v5.1.1
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! uplink-nodejs@1.2.6 install: (node-gyp configure) && (node-gyp rebuild)
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the uplink-nodejs@1.2.6 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/user/.npm/_logs/2023-05-02T07_24_23_149Z-debug.log
user@TG-MacbookPro-2 ptdir_admin %a

is the json package req for uplink-nodejs node-gyp v 7.1.2 and it is using 5.1.1?

please try this suggestion: 'stdlib.h' file not found under macOS Catalina 10.15.4 · Issue #39232 · golang/go · GitHub
or may be better: 'stdlib.h' file not found under macOS Catalina 10.15.4 · Issue #39232 · golang/go · GitHub

you need to upgrade NodeJS to at least 14 (or better to LTS) to be able to use a fresher node-gyp, however it should work for 12 as well. The only problem is clang

1 Like

running brew unlink llvm@4 seemed to solve the problem, must have been referring to old version despite updating xcode?

3 Likes

Yes, but you may try to update it: xcode-select cannot locate clang, even after installing command line tools - Stack Overflow
or select an alternative version: macos - How do I make Xcode use an alternative version of clang? - Stack Overflow

2 posts were split to a new topic: When I call listobjects I get 2 objects when the web interface shows 4 objects under the same passcode used to open and store the objects