Module build failed: Error: Cannot find module 'node-sass'
node-sass
:rainbow: Node.js bindings to libsass
项目地址:https://gitcode.com/gh_mirrors/no/node-sass
免费下载资源
·
由于电脑重装系统了,导致启动vue项目报下面错误
@ ./node_modules/vue-style-loader??ref--8-oneOf-1-0!./node_modules/css-loader?? ref--8-oneOf-1-1!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node _modules/postcss-loader/src??ref--8-oneOf-1-2!./node_modules/sass-loader/dist/cj s.js??ref--8-oneOf-1-3!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_ modules/vue-loader/lib??vue-loader-options!./src/views/meizhuang/videoOne/lesson Plan/index.vue?vue&type=style&index=0&id=85ab621a&lang=scss&scoped=true& 4:14-51 1 14:3-18:5 15:22-519
@ ./src/views/meizhuang/videoOne/lessonPlan/index.vue?vue&type=style&index=0&id =85ab621a&lang=scss&scoped=true&
@ ./src/views/meizhuang/videoOne/lessonPlan/index.vue
@ ./src/router/index.js
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://192.168.4.26:9528/sockjs-node (webpa ck)/hot/dev-server.js ./src/main.js
error in ./src/views/meizhuang/videoTwo/lessonPlan/index.vue?vue&type=style&in dex=0&id=f3ac7266&lang=scss&scoped=true&
Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
Error: Missing binding F:\vue-admin-template-master\node_modules\n ode-sass\vendor\win32-x64-64\binding.node
Node Sass could not find a binding for your current environment: Windows 64-bit with Node.js 10.x
Found bindings for the following environments:
- Windows 64-bit with Node.js 12.x
This usually happens because your environment has changed since running `npm ins tall`.
Run `npm rebuild node-sass` to download the binding for your current environment .
at module.exports (F:\vue-admin-template-master\node_modules\n ode-sass\lib\binding.js:15:13)
at Object.<anonymous> (F:\\vue-admin-template-master\node_modul es\node-sass\lib\index.js:14:35)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at getDefaultSassImpl (F:\\vue-admin-template-master\node_modul es\sass-loader\dist\index.js:198:10)
at Object.loader (F:\vue-admin-template-master\node_modules\sa ss-loader\dist\index.js:80:29)
@ ./node_modules/vue-style-loader??ref--8-oneOf-1-0!./node_modules/css-loader?? ref--8-oneOf-1-1!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node _modules/postcss-loader/src??ref--8-oneOf-1-2!./node_modules/sass-loader/dist/cj s.js??ref--8-oneOf-1-3!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_ modules/vue-loader/lib??vue-loader-options!./src/views/meizhuang/videoTwo/lesson Plan/index.vue?vue&type=style&index=0&id=f3ac7266&lang=scss&scoped=true& 4:14-51 1 14:3-18:5 15:22-519
@ ./src/views/meizhuang/videoTwo/lessonPlan/index.vue?vue&type=style&index=0&id =f3ac7266&lang=scss&scoped=true&
@ ./src/views/meizhuang/videoTwo/lessonPlan/index.vue
@ ./src/router/index.js
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://192.168.4.26:9528/sockjs-node (webpa ck)/hot/dev-server.js ./src/main.js
error in ./src/views/login/index.vue?vue&type=style&index=0&lang=scss&
Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
Error: Missing binding F:\vue-admin-template-master\node_modules\n ode-sass\vendor\win32-x64-64\binding.node
Node Sass could not find a binding for your current environment: Windows 64-bit with Node.js 10.x
Found bindings for the following environments:
- Windows 64-bit with Node.js 12.x
This usually happens because your environment has changed since running `npm ins tall`.
Run `npm rebuild node-sass` to download the binding for your current environment .
at module.exports (F:\vue-admin-template-master\node_modules\n ode-sass\lib\binding.js:15:13)
at Object.<anonymous> (F:\vue-admin-template-master\node_modul es\node-sass\lib\index.js:14:35)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Module.require (internal/modules/cjs/loader.js:692:17)
at require (internal/modules/cjs/helpers.js:25:18)
at getDefaultSassImpl (F:\vue-admin-template-master\node_modul es\sass-loader\dist\index.js:198:10)
at Object.loader (F:\vue-admin-template-master\node_modules\sa ss-loader\dist\index.js:80:29)
@ ./node_modules/vue-style-loader??ref--8-oneOf-1-0!./node_modules/css-loader?? ref--8-oneOf-1-1!./node_modules/vue-loader/lib/loaders/stylePostLoader.js!./node _modules/postcss-loader/src??ref--8-oneOf-1-2!./node_modules/sass-loader/dist/cj s.js??ref--8-oneOf-1-3!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_ modules/vue-loader/lib??vue-loader-options!./src/views/login/index.vue?vue&type= style&index=0&lang=scss& 4:14-451 14:3-18:5 15:22-459
@ ./src/views/login/index.vue?vue&type=style&index=0&lang=scss&
@ ./src/views/login/index.vue
@ ./src/router/index.js
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://192.168.4.26:9528/sockjs-node (webpa ck)/hot/dev-server.js ./src/main.js
error in ./src/views/meizhuang/videoThree/standard/index.vue?vue&type=style&in dex=0&id=780f0392&lang=scss&scoped=true&
Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
Error: Missing binding F:\vue-admin-template-master\node_modules\n ode-sass\vendor\win32-x64-64\binding.node
Node Sass could not find a binding for your current environment: Windows 64-bit with Node.js 10.x
报错显示说找不到node-sass,执行安装node-sass的命令却依然报错。
后面参考前辈经验才知道应该这么安装:cnpm install node-sass --save
安装成功之后就可以重新运行项目了。OK,问题解决。
附:安装cnpm的命令: npm install -g cnpm --registry=https://registry.npm.taobao.org
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 个月前
更多推荐
已为社区贡献1条内容
所有评论(0)