Vue项目install的时候,提示\node_module\node-sass:Command failed
node-sass
:rainbow: Node.js bindings to libsass
项目地址:https://gitcode.com/gh_mirrors/no/node-sass
·
Vue项目install的时候,提示\node_module\node-sass:Command failed
今天在跑Vue项目时,在install包的环节,出现了如标题所示的错误,具体问题如下:

解决方法:
方法一:
npm config set registry https://registry.npm.taobao.org --global
npm config set disturl https://npm.taobao.org/dist --global
方法二:
方法一如果还没有解决,那通常,方法二能解决。特别是用yarn的情况,出现该错误,原因是因为没有安装python,执行:
// 编译环境
npm install -g node-gyp
npm install --global --production windows-build-tools
// 最后安装缺失的包
npm install node-sass --save-dev
至此,问题得以解决。当然也可以用yarn:
// 编译环境
yarn add node-gyp
yarn add --production windows-build-tools
// 最后安装缺失的包
yarn add node-sass --save-dev
:rainbow: Node.js bindings to libsass
最近提交(Master分支:4 个月前 )
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 年前
AtomGit 是由开放原子开源基金会联合 CSDN 等生态伙伴共同推出的新一代开源与人工智能协作平台。平台坚持“开放、中立、公益”的理念,把代码托管、模型共享、数据集托管、智能体开发体验和算力服务整合在一起,为开发者提供从开发、训练到部署的一站式体验。
更多推荐


所有评论(0)