I'm having some issues with the node-gyp
package, and I believe it's because I need to use python 2.7 rather than python 3.
I have set-up my PATH environment variables so that when I do python --version
the output is Python 2.7.16
.
However, in the same terminal, when I go to yarn
install my project. It fails, and I can see the output of the logs is:
Command: node-gyp rebuild
Arguments:
Directory: /Users/myname/Documents/myproject
Output:
gyp info it worked if it ends with ok
gyp info using node-gyp@5.0.5
gyp info using node@12.14.0 | darwin | x64
gyp info find Python using Python version 3.7.3 found at "/Users/myname/anaconda3/bin/python"
I am also using nvm. Catalina 10.15.2. Node 12.14.0. NVM 0.33.11.
Why does my terminal version show me as using 2.7, but then the logs show the command node-gyp rebuild
as using 3.7.3? If I've already set-up my environment variables, what can I change to rectify this? Is it something to do with nvm?