Hello everyone, today we will take a look at a mix-in problem. The main reason of this situation is deprecated dependencies.
The project that we developed use a node version 14.18.0
and we use a node-sass version 4.14.1 package and this package also deprecated for today.
PS: You can use normal sass package today instead of node-sass.
The error out looks like these
Error: Can't find Python executable "python", you can set the PYTHON env variable.
The python3 was already installed on my pc. But this is not helped at all.
We need to install python 2.7.18
We can use pyenv to work multiple python version. Let's download it.
1- Install "pyenv"
brew install pyenv
2- Install the "2.7.18" version of python
pyenv install 2.7.18
and set it as a global
pyenv global 2.7.18
3- Add python executable directory to PATH
export PATH="${HOME}/.pyenv/shims:${PATH}"
You can check the PATHs with;
echo $PATH
4- Add python executable directory to the .npmrc
npm config set python $(which python)
You can check the config with
npm config list
or check from .npmrc;
cat .npmrc
After these steps, you can able to work with "python" and the node starts to will work with the "python" alias.
Arrivederci 👋
Source:
Top comments (3)
thanks. that's great.
worked for me
Tesekkurler Hasan,
export PATH="${HOME}/.pyenv/shims:${PATH}" bu adim icin zshrc'ye eklenmesi gerektigini belirten bir aciklama eklenebilir