Error: Cannot find module 'node-sass' 和 stylus 解决方法
node-sass
:rainbow: Node.js bindings to libsass
项目地址:https://gitcode.com/gh_mirrors/no/node-sass
免费下载资源
·
第一种错误,我一开始的解决方法是
npm install node-sass --save-dev
npm install sass–loader --save-dev
npm install
第二种错误,是因为sass版本高了
下载的时候npm install node-sass@7.3.1 --save-dev就可以了
在package.json里面更改sass版本为7.3.1
我遇到的第三种错误发现上面两种都解决不掉,就需要cnpm下载
cnpm指令源 npm install -g cnpm --registry=https://registry.npm.taobao.org
然后下载cnpm install node-sass --save 就可以了 npm install -D 解决nuxt里面一直出现这个问题
快速删除node_modules
npm install rimraf -g
rimraf node_modules
npm install stylus stylus-loader style-loader --save-dev
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 个月前
更多推荐
已为社区贡献2条内容
所有评论(0)