解决 node-sass 安装错误: 找不到 Python 可执行文件
The error message suggests that there is a problem with the installation of the 'node-sass' package. Specifically, it indicates that the Python executable 'python3.11.4' cannot be found.
To resolve this issue, you can try the following steps:
-
Make sure you have Python installed on your system. You can download Python from the official website (https://www.python.org/downloads/) and install it.
-
Set the 'PYTHON' environment variable to point to the location of your Python executable. You can do this by opening a command prompt and running the following command (replace 'C:\Path\to\Python' with the actual path to your Python installation):
set PYTHON=C:\Path\to\Python -
Try reinstalling the 'node-sass' package by deleting the 'node_modules' folder and running 'yarn install' again:
rm -rf node_modules yarn install -
If the issue persists, you can try upgrading Node.js to the latest version and then reinstalling the 'node-sass' package:
npm install -g npm@latest rm -rf node_modules yarn install
By following these steps, you should be able to resolve the 'node-sass' installation error.
原文地址: https://www.cveoy.top/t/topic/qsWD 著作权归作者所有。请勿转载和采集!