在使用vue过程中,总会用到这样哪样的UI框架,在install这些框架时,往往还需要安装其要求的依赖,或是相关的编译环境,下面将记录描述下python和node-sass的安装办法:

一:python安装:

1.官网下载安装包,传统安装,然后配置相关环境变量

2.在安装了node但是为安装python的前提下,通过npm指令安装对应版本的python(建议方式)

npm install --global --production windows-build-tools

对于非python玩家,建议方式二安装python环境,该方式,node会为你匹配对应node版本的python,这样将避免后续使用中的版本过高或过低造成的编译失败问题,比如node16+在python2.x下编译会抛出version问题。

二:node-sass安装

node-sass的安装有很多方式,在此我仅介绍一种(多次尝试,这种方式最方便稳定)

node-sass
:rainbow: Node.js bindings to libsass

node 8.x 以上的小伙伴看这里:

npm install --save node-sass --registry=https://registry.npm.taobao.org --disturl=https://npm.taobao.org/dist --sass-binary-site=http://npm.taobao.org/mirrors/node-sass

--registry=https://registry.npm.taobao.org  淘宝npm包镜像
--disturl=https://npm.taobao.org/dist  淘宝node源码镜像,一些二进制包编译时用
--sass-binary-site=http://npm.taobao.org/mirrors/node-sass  这个才是node-sass镜像

node 8.x 以下的小伙伴看这里:

1.先全局安装cnpm

npm install -g cnpm --registry=https://registry.npm.taobao.org

2.利用淘宝的npm镜像安装node-sass

cnpm install node-sass 
GitHub 加速计划 / no / node-sass
9
0
下载
:rainbow: Node.js bindings to libsass
最近提交(Master分支:6 个月前 )
6081731a Bumps [actions/setup-node](https://github.com/actions/setup-node) from 3 to 4. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/setup-node dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> 1 年前
62c0f46c Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> 1 年前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐