Can't install web3 on macos - macos

I'm having difficulties installing web3 on my mac. I've tried a number of fixes but I get the same error every time.
I tried installing sha3 separately and made sure that I had Xtools installed.
gyp ERR! configure error
gyp ERR! stack Error: Command failed: /Users/craiglou/anaconda3/bin/python -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack File "<string>", line 1
gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack
gyp ERR! stack at ChildProcess.exithandler (child_process.js:294:12)
gyp ERR! stack at ChildProcess.emit (events.js:189:13)
gyp ERR! stack at maybeClose (internal/child_process.js:970:16)
gyp ERR! stack at Socket.stream.socket.on (internal/child_process.js:389:11)
gyp ERR! stack at Socket.emit (events.js:189:13)
gyp ERR! stack at Pipe._handle.close (net.js:597:12)
gyp ERR! System Darwin 18.6.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/craiglou/Desktop/inbox/node_modules/keccakjs/node_modules/sha3
gyp ERR! node -v v10.15.3
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN webpack-cli#2.1.5 requires a peer of webpack#^4.0.0 but none is installed. You must install peer dependencies yourself.
npm WARN inbox#1.0.0 No description
npm WARN inbox#1.0.0 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! sha3#1.2.3 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the sha3#1.2.3 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/craiglou/.npm/_logs/2019-08-19T23_31_04_618Z-debug.log

Related

Getting dependency errors upon expo-update on mac for ios-build, unable to install node-modules

npm ERR! path /Users/admin/Documents/New/my-app/frontend/node_modules/sqlite3
npm ERR! command failed
npm ERR! command sh -c node-pre-gyp install --fallback-to-build
npm ERR! ACTION deps_sqlite3_gyp_action_before_build_target_unpack_sqlite_dep Release/obj/gen/sqlite-autoconf-3310100/sqlite3.c
npm ERR! Failed to execute ‘/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/admin/Documents/New/my-app/frontend/node_modules/sqlite3/lib/binding/node-v93-darwin-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/Users/admin/Documents/New/my-app/frontend/node_modules/sqlite3/lib/binding/node-v93-darwin-x64 --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93’ (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using node-pre-gyp#0.11.0
npm ERR! node-pre-gyp info using node#16.14.2 | darwin | x64
npm ERR! node-pre-gyp WARN Using request for node-pre-gyp https download
npm ERR! node-pre-gyp info check checked for “/Users/admin/Documents/New/my-app/frontend/node_modules/sqlite3/lib/binding/node-v93-darwin-x64/node_sqlite3.node” (not found)
npm ERR! node-pre-gyp WARN Tried to download(403):
npm ERR! node-pre-gyp WARN Pre-built binaries not found for sqlite3#4.2.0 and node#16.14.2 (node-v93 ABI, unknown) (falling back to source compile with node-gyp)
npm ERR! node-pre-gyp http 403 status code downloading tarball
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp#8.4.1
npm ERR! gyp info using node#16.14.2 | darwin | x64
npm ERR! gyp info ok
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using node-gyp#8.4.1
npm ERR! gyp info using node#16.14.2 | darwin | x64
npm ERR! gyp info find Python using Python version 3.8.9 found at “/Applications/Xcode.app/Contents/Developer/usr/bin/python3”
npm ERR! gyp info spawn /Applications/Xcode.app/Contents/Developer/usr/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args ‘/usr/local/lib/node_modules/npm/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 ‘/Users/admin/Documents/New/my-app/frontend/node_modules/sqlite3/build/config.gypi’,
npm ERR! gyp info spawn args ‘-I’,
npm ERR! gyp info spawn args ‘/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi’,
npm ERR! gyp info spawn args ‘-I’,
npm ERR! gyp info spawn args ‘/Users/admin/Library/Caches/node-gyp/16.14.2/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=/Users/admin/Library/Caches/node-gyp/16.14.2’,
npm ERR! gyp info spawn args ‘-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp’,
npm ERR! gyp info spawn args ‘-Dnode_lib_file=/Users/admin/Library/Caches/node-gyp/16.14.2/<(target_arch)/node.lib’,
npm ERR! gyp info spawn args ‘-Dmodule_root_dir=/Users/admin/Documents/New/my-app/frontend/node_modules/sqlite3’,
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#8.4.1
npm ERR! gyp info using node#16.14.2 | darwin | x64
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ ‘BUILDTYPE=Release’, ‘-C’, ‘build’ ]
npm ERR! /bin/sh: python: command not found
npm ERR! make: *** [Release/obj/gen/sqlite-autoconf-3310100/sqlite3.c] Error 127
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 (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:526:28)
npm ERR! gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! gyp ERR! System Darwin 21.5.0
npm ERR! gyp ERR! command “/usr/local/bin/node” “/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” “build” “–fallback-to-build” “–module=/Users/admin/Documents/New/my-app/frontend/node_modules/sqlite3/lib/binding/node-v93-darwin-x64/node_sqlite3.node” “–module_name=node_sqlite3” “–module_path=/Users/admin/Documents/New/my-app/frontend/node_modules/sqlite3/lib/binding/node-v93-darwin-x64” “–napi_version=8” “–node_abi_napi=napi” “–napi_build_version=0” “–node_napi_label=node-v93”
npm ERR! gyp ERR! cwd /Users/admin/Documents/New/my-app/frontend/node_modules/sqlite3
npm ERR! gyp ERR! node -v v16.14.2
npm ERR! gyp ERR! node-gyp -v v8.4.1
npm ERR! gyp ERR! not ok
npm ERR! node-pre-gyp ERR! build error
npm ERR! node-pre-gyp ERR! stack Error: Failed to execute ‘/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Users/admin/Documents/New/my-app/frontend/node_modules/sqlite3/lib/binding/node-v93-darwin-x64/node_sqlite3.node --module_name=node_sqlite3 --module_path=/Users/admin/Documents/New/my-app/frontend/node_modules/sqlite3/lib/binding/node-v93-darwin-x64 --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v93’ (1)
npm ERR! node-pre-gyp ERR! stack at ChildProcess. (/Users/admin/Documents/New/my-app/frontend/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.emit (node:events:526:28)
npm ERR! node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1092:16)
npm ERR! node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
npm ERR! node-pre-gyp ERR! System Darwin 21.5.0
npm ERR! node-pre-gyp ERR! command “/usr/local/bin/node” “/Users/admin/Documents/New/my-app/frontend/node_modules/.bin/node-pre-gyp” “install” “–fallback-to-build”
npm ERR! node-pre-gyp ERR! cwd /Users/admin/Documents/New/my-app/frontend/node_modules/sqlite3
npm ERR! node-pre-gyp ERR! node -v v16.14.2
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v0.11.0
npm ERR! node-pre-gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! /Users/admin/.npm/_logs/2022-05-31T05_31_43_462Z-debug-0.lo
I’m using the node -:16.15.0, expo-cli -:5.3.1, and expo-:41 versions and I’m getting above error whenever I’m running “npm install” command.

I can't install VCRemote on MacOS 10.13.6

I'm trying to install VCRemote on MacOS but when I try
npm install -g --unsafe-perm vcremote
I get the following errors
ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:189:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Darwin 17.7.0
gypgyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/usr/local/lib/node_modules/vcremote/node_modules/node-ios-device/binding/node-v64-darwin-x64/node_ios_device.node" "--module_name=node_ios_device" "--module_path=/usr/local/lib/node_modules/vcremote/node_modules/node-ios-device/binding/node-v64-darwin-x64"
gyp ERR! cwd /usr/local/lib/node_modules/vcremote/node_modules/node-ios-device
gyp ERR! node -v v10.15.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:189:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Darwin 17.7.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/usr/local/lib/node_modules/vcremote/node_modules/node-ios-device/binding/node-v64-darwin-x64/node_ios_device.node" "--module_name=node_ios_device" "--module_path=/usr/local/lib/node_modules/vcremote/node_modules/node-ios-device/binding/node-v64-darwin-x64"
gyp ERR! cwd /usr/local/lib/node_modules/vcremote/node_modules/node-ios-device
gyp ERR! node -v v10.15.1
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
node-pre-gyp ERR! build error
node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/usr/local/lib/node_modules/vcremote/node_modules/node-ios-device/binding/node-v64-darwin-x64/node_ios_device.node --module_name=node_ios_device --module_path=/usr/local/lib/node_modules/vcremote/node_modules/node-ios-device/binding/node-v64-darwin-x64' (1)
node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/vcremote/node_modules/node-ios-device/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:189:13)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:970:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
node-pre-gyp ERR! System Darwin 17.7.0
node-pre-gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/vcremote/node_modules/node-ios-device/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /usr/local/lib/node_modules/vcremote/node_modules/node-ios-device
node-pre-gyp ERR! node -v v10.15.1
node-pre-gyp ERR! node-pre-gyp -v v0.6.31
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/usr/local/lib/node_modules/vcremote/node_modules/node-ios-device/binding/node-v64-darwin-x64/node_ios_device.node --module_name=node_ios_device --module_path=/usr/local/lib/node_modules/vcremote/node_modules/node-ios-device/binding/node-v64-darwin-x64' (1)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! node-ios-device#1.1.0 install: `node-pre-gyp install --fallback-to-build`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the node-ios-device#1.1.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
Am I missing something? I'm fairly new to NPM, I'm following this guide from Microsoft guide here to set up vcremote
I can attach the full error log if needed as well.
Any guidance or help is greatly appreciated.

configure: error: C compiler cannot create executables mac

I am trying to install ccxt on my Macbook Air using sudo npm install --save ccxt and encountered the following error:
> scrypt#6.0.3 preinstall /Applications/Xcode.app/Contents/Developer/Toolchains/node_modules/scrypt
> node node-scrypt-preinstall.js
Error: Error: Command failed: ./configure
configure: error: in `/Applications/Xcode.app/Contents/Developer/Toolchains/node_modules/scrypt/scrypt/scrypt-1.2.0':
configure: error: C compiler cannot create executables
See `config.log' for more details
> scrypt#6.0.3 install /Applications/Xcode.app/Contents/Developer/Toolchains/node_modules/scrypt
> node-gyp rebuild
gyp ERR! configure error
gyp ERR! stack Error: Command failed: /Users/peterpham/anaconda3/bin/python -c import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack File "<string>", line 1
gyp ERR! stack import sys; print "%s.%s.%s" % sys.version_info[:3];
gyp ERR! stack ^
gyp ERR! stack SyntaxError: invalid syntax
gyp ERR! stack
gyp ERR! stack at ChildProcess.exithandler (child_process.js:275:12)
gyp ERR! stack at emitTwo (events.js:126:13)
gyp ERR! stack at ChildProcess.emit (events.js:214:7)
gyp ERR! stack at maybeClose (internal/child_process.js:925:16)
gyp ERR! stack at Socket.stream.socket.on (internal/child_process.js:346:11)
gyp ERR! stack at emitOne (events.js:116:13)
gyp ERR! stack at Socket.emit (events.js:211:7)
gyp ERR! stack at Pipe._handle.close [as _onclose] (net.js:557:12)
gyp ERR! System Darwin 17.7.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Applications/Xcode.app/Contents/Developer/Toolchains/node_modules/scrypt
gyp ERR! node -v v8.11.3
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN enoent ENOENT: no such file or directory, open '/Applications/Xcode.app/Contents/Developer/Toolchains/package.json'
npm WARN Toolchains No description
npm WARN Toolchains No repository field.
npm WARN Toolchains No README data
npm WARN Toolchains No license field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! scrypt#6.0.3 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the scrypt#6.0.3 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/peterpham/.npm/_logs/2018-08-30T04_34_20_141Z-debug.log
I have Xcode 9.4.1 installed and checked that my command line tools were installed in the Preferences > Location section like in this other stackoverflow question. I also tried out all of the following answers in my terminal to change directories and ownerships to no avail. Also tried just sudo npm install --save scrypt with the same error. It has possibly something to do with the anaconda env pathing.
I'm pretty sure it has to do with some configuration but I'm not sure what it is. If you need anymore information please tell me and I'll post it. I don't know where the configure.log is so I can't post it, I've tried to find it using resources online as well and am lost.
The key to solving the error was this part of the error code:
gyp ERR! stack Error: Command failed: /Users/peterpham/anaconda3/bin/python -c import sys; print "%s.%s.%s" % sys.version_info[:3];
So I tried installing python 2.7, which didn't work. So I tried uninstalling Anaconda from my computer using App Cleaner and that did the trick. Afterwards I could run the command npm install --save ccxt!

Unable to npm i x509 on osx

So I don't seem to be able to install the x509 package on Mac osx.
my-air:temp me$ node -v
v10.0.0
my-air:temp me$ npm -v
6.3.0
my-air:temp me$ npm i x509
> x509#0.3.3 install /Users/me/workspace/temp/node_modules/x509
> node-gyp rebuild
CXX(target) Release/obj.target/x509/src/addon.o
In file included from ../src/addon.cc:5:
In file included from ../include/x509.h:7:
In file included from ../../nan/nan.h:194:
../../nan/nan_maybe_43_inl.h:88:15: error: no member named 'ForceSet' in 'v8::Object'
return obj->ForceSet(GetCurrentContext(), key, value, attribs);
...
4 warnings and 7 errors generated.
make: *** [Release/obj.target/x509/src/addon.o] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit
(/usr/local/lib/node_modules/npm/node_modules/node-
gyp/lib/build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:182:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit
(internal/child_process.js:225:12)
gyp ERR! System Darwin 17.6.0
gyp ERR! command "/usr/local/Cellar/node/7.0.0/bin/node"
"/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js"
"rebuild"
gyp ERR! cwd /Users/me/workspace/temp/node_modules/x509
gyp ERR! node -v v10.0.0
gyp ERR! node-gyp -v v3.7.0
gyp ERR! not ok
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! x509#0.3.3 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the x509#0.3.3 install script.
Any help would be greatly appreciated. Am I missing a c compiler or something?

I want to take "terminal" in "Atom"

I want to take "terminal" in "Atom", but many of errors happen to me. Could you help?
Code:
$ apm install term2
Installing term2 to /User/.atom/packages ✗
> pty.js#0.2.13 install /private/var/folders/bh/qqktv0_n49vc585f8dn7hq600000gn/T/apm-install-dir-115721-23811-m9y2he/node_modules/term2/node_modules/pty.js
> node-gyp rebuild
CXX(target) Release/obj.target/pty/src/unix/pty.o
SOLINK_MODULE(target) Release/pty.node
ld: library not found for -lgcc_s.10.5
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Release/pty.node] Error 1
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/Users/Downloads/Atom.app/Contents/Resources/app/apm/node_modules/npm/node_modules/node-gyp/lib/build.js:267:23)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:820:12)
gyp ERR! System Darwin 14.4.0
gyp ERR! command "node" "/Users/Downloads/Atom.app/Contents/Resources/app/apm/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /private/var/folders/bh/qqktv0_n49vc585f8dn7hq600000gn/T/apm-install-dir-115721-23811-m9y2he/node_modules/term2/node_modules/pty.js
gyp ERR! node -v v0.10.35
gyp ERR! node-gyp -v v1.0.2
gyp ERR! not ok
npm ERR! Darwin 14.4.0
npm ERR! argv "/Users//Downloads/Atom.app/Contents/Resources/app/apm/bin/node" "/Users/Downloads/Atom.app/Contents/Resources/app/apm/node_modules/npm/bin/npm-cli.js" "--globalconfig" "/Users//.atom/.apm/.apmrc" "--userconfig" "/Users//.atom/.apmrc" "install" "/private/var/folders/bh/qqktv0_n49vc585f8dn7hq600000gn/T/d-115721-23811-j9f77o/package.tgz" "--target=0.22.0" "--arch=x64"
npm ERR! node v0.10.35
npm ERR! npm v2.5.1
npm ERR! code ELIFECYCLE
npm ERR! pty.js#0.2.13 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the pty.js#0.2.13 install script 'node-gyp rebuild'.
npm ERR! This is most likely a problem with the pty.js package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get their info via:
npm ERR! npm owner ls pty.js
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /private/var/folders/bh/qqktv0_n49vc585f8dn7hq600000gn/T/apm-install-dir-115721-23811-m9y2he/npm-debug.log

Resources