[NodeJS] How the solve problem with building of node-saas(7.0.1) on nodejs 17

Hello,  because in some projects I has legacy dependencies (version lock), I got some problems with modern versions of nodejs interpretator, you will just got errrors on trying of build.

You can reproduce it on MacOSX 12.3.1 and Node JS 17/18. One of the problems - python2, it's have problems on modern versions mac, so you can't install it using brew command


So algorithm for solving it:

  1. Install python2 from official site (https://www.python.org/downloads/release/python-2718/)
  2. which python2
  3. npm config set python /Library/Frameworks/Python.framework/Versions/2.7/bin/python2
  4. Install gcc/clang C++ compiler (hint: you can install xcode)
  5. CXXFLAGS="--std=c++17" npm i

Комментарии