node-sass(4.14.1)依赖下载问题
环境:MacBook Pro M2;node v14.21.3;npm v6.14.18;
报错:
Error: Command failed: /opt/homebrew/bin/python3 -c import sys; print “%s.%s.%s” % sys.version_info[:3];
解决:
安装python2的环境,设置python路径
-
直接在官网下载安装
macOS 64-bit installer
-
设置python环境
$ which python2 /Users/frankie/.pyenv/shims/python $ npm config set python /Users/frankie/.pyenv/shims/python
-
重新
npm i