因为也是小白,安装sass一直报错,可以试试我这个方法:
天知道我踩了几个坑才弄出来的,哭死!
npm init vue@latest
如果这样的错,先运行下面的
npm config set registry https://registry.npmmirror.com
npm config get registry
npm init vue@latest
cd vue-demo
npm install cnpm -g --registry=https://registry.npmmirror.com
cnpm install
npm install sass --save-dev (如果这样安装不了)
npm install node-sass(还有这样安装不了)
那就这样
npm install -g pnpm
pnpm i sass
成功后应该就可以使用sass