Hello, because in some projects I have legacy dependencies (locked versions), I got some problems with modern versions of Node.js interpreter, you will just get errors on trying to build.
You can reproduce it on macOS 12.3.1 and Node.js 17/18. One of the issues – python2, it has issues on modern versions of mac, so you can't install it using brew command.
So, algorithm for solving it:
- Install python2 from official site (https://www.python.org/downloads/release/python-2718/)
which python2
npm config set python /Library/Frameworks/Python.framework/Versions/2.7/bin/python2
- Install GCC/clang C++ compiler (hint: you can install Xcode)
CXXFLAGS="--std=c++17" npm i