LIbtidy-updated error on macos Mojave 10.14.6 & Node v12.16.3

when trying to install https://gitlab.coko.foundation/editoria/vanilla-edk and running Yarn theres seem to be a problem with the libtidy-updated library, here the log:

error /Users/juangomez/Desktop/vanilla-edk-HEAD/node_modules/libtidy-updated: Command failed.
Exit code: 1
Command: node-pre-gyp install --fallback-to-build
Arguments: 
Directory: /Users/juangomez/Desktop/vanilla-edk-HEAD/node_modules/libtidy-updated
Output:
node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using node-pre-gyp@0.14.0
node-pre-gyp info using node@12.16.3 | darwin | x64
node-pre-gyp WARN Using request for node-pre-gyp https download 
node-pre-gyp info check checked for "/Users/juangomez/Desktop/vanilla-edk-HEAD/node_modules/libtidy-updated/lib/tidy.node" (not found)
node-pre-gyp http GET https://github.com/gagern/node-libtidy/releases/download/v0.4.1/node-v72-darwin-x64.tar.gz
node-pre-gyp http 404 https://github.com/gagern/node-libtidy/releases/download/v0.4.1/node-v72-darwin-x64.tar.gz
node-pre-gyp WARN Tried to download(404): https://github.com/gagern/node-libtidy/releases/download/v0.4.1/node-v72-darwin-x64.tar.gz 
node-pre-gyp WARN Pre-built binaries not found for libtidy-updated@0.4.1 and node@12.16.3 (node-v72 ABI, unknown) (falling back to source compile with node-gyp) 
node-pre-gyp http 404 status code downloading tarball https://github.com/gagern/node-libtidy/releases/download/v0.4.1/node-v72-darwin-x64.tar.gz 
gyp info it worked if it ends with ok
gyp info using node-gyp@3.8.0
gyp info using node@12.16.3 | darwin | x64
gyp info ok 

Hello @JuanGomez!
Unfortunately, I cannot reproduce your issue. Currently, I am using Node v 12.18.2, yarn v 1.22.4 and I have Catalina 10.15.6 and everything builds without any issues.
My suggestion is to download again the vanilla-edk and start from scratch.

Thanks for the reply.
I have done as you said already 3 times with different versions of node and no good results.
Might change to Catalina soon and hope this helps.

I installed Catalina 10.15.16 and tried again from scratch with no luck.
using Node v 12.18.2, yarn v 1.22.4.

Could you suggest a workaround for this?

hey @JuanGomez.

I tried it with node 12.18.2 (as well as 12.16.1) and yarn 1.22.4.
Didn’t run into your issue.

Can you try re-cloning the repo and running the commands again?

git clone https://gitlab.coko.foundation/editoria/vanilla-edk.git

cd vanilla-edk

sh setup.sh

yarn

hello @yannis,

Same error:

Exit code: 1
Command: node-pre-gyp install --fallback-to-build
Arguments: 
Directory: /Users/juangomez/Desktop/vanilla-edk-test/node_modules/libtidy-updated
Output:
node-pre-gyp info it worked if it ends with ok
node-pre-gyp info using node-pre-gyp@0.14.0
node-pre-gyp info using node@12.18.2 | darwin | x64
node-pre-gyp WARN Using request for node-pre-gyp https download 
node-pre-gyp info check checked for "/Users/juangomez/Desktop/vanilla-edk-test/node_modules/libtidy-updated/lib/tidy.node" (not found)
node-pre-gyp http GET https://github.com/gagern/node-libtidy/releases/download/v0.4.1/node-v72-darwin-x64.tar.gz
node-pre-gyp http 404 https://github.com/gagern/node-libtidy/releases/download/v0.4.1/node-v72-darwin-x64.tar.gz
node-pre-gyp WARN Tried to download(404): https://github.com/gagern/node-libtidy/releases/download/v0.4.1/node-v72-darwin-x64.tar.gz 
node-pre-gyp WARN Pre-built binaries not found for libtidy-updated@0.4.1 and node@12.18.2 (node-v72 ABI, unknown) (falling back to source compile with node-gyp) 
node-pre-gyp http 404 status code downloading tarball https://github.com/gagern/node-libtidy/releases/download/v0.4.1/node-v72-darwin-x64.tar.gz 
gyp info it worked if it ends with ok
gyp info using node-gyp@3.8.0
gyp info using node@12.18.2 | darwin | x64
gyp info ok 
gyp info it worked if it ends with ok
gyp info using node-gyp@3.8.0
gyp info using node@12.18.2 | darwin | x64
gyp info spawn /usr/local/bin/python2
gyp info spawn args [
gyp info spawn args   '/Users/juangomez/Desktop/vanilla-edk-test/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/juangomez/Desktop/vanilla-edk-test/node_modules/libtidy-updated/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/juangomez/Desktop/vanilla-edk-test/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/Users/juangomez/.node-gyp/12.18.2/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/Users/juangomez/.node-gyp/12.18.2',
gyp info spawn args   '-Dnode_gyp_dir=/Users/juangomez/Desktop/vanilla-edk-test/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/Users/juangomez/.node-gyp/12.18.2/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/Users/juangomez/Desktop/vanilla-edk-test/node_modules/libtidy-updated',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
ERROR:root:code for hash md5 was not found.
Traceback (most recent call last):
  File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 147, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type md5
ERROR:root:code for hash sha1 was not found.
Traceback (most recent call last):
  File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 147, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha1
ERROR:root:code for hash sha224 was not found.
Traceback (most recent call last):
  File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 147, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha224
ERROR:root:code for hash sha256 was not found.
Traceback (most recent call last):
  File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 147, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha256
ERROR:root:code for hash sha384 was not found.
Traceback (most recent call last):
  File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 147, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha384
ERROR:root:code for hash sha512 was not found.
Traceback (most recent call last):
  File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 147, in <module>
    globals()[__func_name] = __get_hash(__func_name)
  File "/usr/local/Cellar/python@2/2.7.16/Frameworks/Python.framework/Versions/2.7/lib/python2.7/hashlib.py", line 97, in __get_builtin_constructor
    raise ValueError('unsupported hash type ' + name)
ValueError: unsupported hash type sha512
Traceback (most recent call last):
  File "/Users/juangomez/Desktop/vanilla-edk-test/node_modules/node-gyp/gyp/gyp_main.py", line 16, in <module>
    sys.exit(gyp.script_main())
  File "/Users/juangomez/Desktop/vanilla-edk-test/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 545, in script_main
    return main(sys.argv[1:])
  File "/Users/juangomez/Desktop/vanilla-edk-test/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 538, in main
    return gyp_main(args)
  File "/Users/juangomez/Desktop/vanilla-edk-test/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 514, in gyp_main
    options.duplicate_basename_check)
  File "/Users/juangomez/Desktop/vanilla-edk-test/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 98, in Load
    generator.CalculateVariables(default_variables, params)
  File "/Users/juangomez/Desktop/vanilla-edk-test/node_modules/node-gyp/gyp/pylib/gyp/generator/make.py", line 79, in CalculateVariables
    import gyp.generator.xcode as xcode_generator
  File "/Users/juangomez/Desktop/vanilla-edk-test/node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.py", line 7, in <module>
    import gyp.xcodeproj_file
  File "/Users/juangomez/Desktop/vanilla-edk-test/node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py", line 152, in <module>
    _new_sha1 = hashlib.sha1
AttributeError: 'module' object has no attribute 'sha1'
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/Users/juangomez/Desktop/vanilla-edk-test/node_modules/node-gyp/lib/configure.js:345:16)
gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:275:12)
gyp ERR! System Darwin 19.6.0
gyp ERR! command "/Users/juangomez/.nvm/versions/node/v12.18.2/bin/node" "/Users/juangomez/Desktop/vanilla-edk-test/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--module=/Users/juangomez/Desktop/vanilla-edk-test/node_modules/libtidy-updated/lib/tidy.node" "--module_name=tidy" "--module_path=/Users/juangomez/Desktop/vanilla-edk-test/node_modules/libtidy-updated/lib" "--napi_version=6" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v72"
gyp ERR! cwd /Users/juangomez/Desktop/vanilla-edk-test/node_modules/libtidy-updated
gyp ERR! node -v v12.18.2
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 '/Users/juangomez/.nvm/versions/node/v12.18.2/bin/node /Users/juangomez/Desktop/vanilla-edk-test/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/Users/juangomez/Desktop/vanilla-edk-test/node_modules/libtidy-updated/lib/tidy.node --module_name=tidy --module_path=/Users/juangomez/Desktop/vanilla-edk-test/node_modules/libtidy-updated/lib --napi_version=6 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v72' (1)
node-pre-gyp ERR! stack     at ChildProcess.<anonymous> (/Users/juangomez/Desktop/vanilla-edk-test/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
node-pre-gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
node-pre-gyp ERR! stack     at maybeClose (internal/child_process.js:1021:16)
node-pre-gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5)
node-pre-gyp ERR! System Darwin 19.6.0
node-pre-gyp ERR! command "/Users/juangomez/.nvm/versions/node/v12.18.2/bin/node" "/Users/juangomez/Desktop/vanilla-edk-test/node_modules/libtidy-updated/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /Users/juangomez/Desktop/vanilla-edk-test/node_modules/libtidy-updated
node-pre-gyp ERR! node -v v12.18.2
node-pre-gyp ERR! node-pre-gyp -v v0.14.0
node-pre-gyp ERR! not ok```

manage to solve it with:

brew uninstall python@2
brew install pr0d1r2/python2/python@2.7.17

and also installing all the most recent update of xcode helped