vue项目,执行npm install,命令安装插件,一直报错如下

我会的有2种解决方案,方案一:安装python2.7环境

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

方案二:有的人不想安装python,可以试试这个(别人的方法,参考:vue安装node-sass检查python2.7.exe问题_node-sass python_MtiredM的博客-CSDN博客)

下载已进行预编译的依赖包,处理方式:
在项目根目录下执行以下命令,将node-sass的下载目录指向预编译包目录

npm config set sass_binary_site http://cdn.npm.taobao.org/dist/node-sass

 方案三:node和sass的版本不匹配,安装适合的sass插件(这个方法我没试过)

GitHub 加速计划 / no / node-sass
8.5 K
1.33 K
下载
:rainbow: Node.js bindings to libsass
最近提交(Master分支:2 个月前 )
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> 9 个月前
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> 9 个月前
Logo

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

更多推荐