While working on some Javascriptey stuff, your library or solution requires you to use something written in C or C++. Easy peasy, just install ffi
using the package manager and declare victory ð.
npm i ffi -D
Not so fast (read slowly, yeah try again with the playback speed of 0.25)
Scrolling past the giant list of WARN
, a small ERROR
greets you ð.
node-gyp
failed to install ð.
There could be 101 reasons for that node-gyp error ?
A few google search and failed attempts later….âģ
You find that its due to the python version. https://github.com/libxmljs/libxmljs/issues/469
Node gyp build process uses python 2.7 ðĪŠ. So, then you just use your trusty anaconda (or virtualenv) and create a new environment with Python 2.7.
conda create -n py27 python=2.7
conda activate py27
# and now continue with your npm install thingie...ðĻð―âðŧ