2021-10-16 乐帮网
webpack nodejs
错误描述:
ERROR in ./static/sass/element-variables.scss
Module build failed: ModuleBuildError: Module build failed: Error: Node Sass does not yet support your current environment: Windows 64-bit with Unsupported runtime (93)
For more information on which environments are supported please see:
https://github.com/sass/node-sass/releases/tag/v4.14.1
at module.exports (E:\code\svn\vktnodeapp\node_modules\node-sass\lib\binding.js:13:13)
at Object.<anonymous> (E:\code\svn\vktnodeapp\node_modules\node-sass\lib\index.js:14:35)
at Module._compile (node:internal/modules/cjs/loader:1095:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1124:10)
at Module.load (node:internal/modules/cjs/loader:975:32)
at Function.Module._load (node:internal/modules/cjs/loader:816:12)
at Module.require (node:internal/modules/cjs/loader:999:19)
at require (node:internal/modules/cjs/helpers:93:18)
at getDefaultSassImpl (E:\code\svn\vktnodeapp\node_modules\sass-loader\dist\index.js:198:10)
at Object.loader (E:\code\svn\vktnodeapp\node_modules\sass-loader\dist\index.js:80:29)
at E:\code\svn\vktnodeapp\node_modules\webpack\lib\NormalModule.js:195:19
at E:\code\svn\vktnodeapp\node_modules\loader-runner\lib\LoaderRunner.js:367:11
at E:\code\svn\vktnodeapp\node_modules\loader-runner\lib\LoaderRunner.js:233:18
at runSyncOrAsync (E:\code\svn\vktnodeapp\node_modules\loader-runner\lib\LoaderRunner.js:143:3)
at iterateNormalLoaders (E:\code\svn\vktnodeapp\node_modules\loader-runner\lib\LoaderRunner.js:232:2)
at E:\code\svn\vktnodeapp\node_modules\loader-runner\lib\LoaderRunner.js:205:4
at E:\code\svn\vktnodeapp\node_modules\enhanced-resolve\lib\CachedInputFileSystem.js:70:14
at processTicksAndRejections (node:internal/process/task_queues:78:11)
@ ./static/sass/element-variables.scss
@ ./src/main.js
Build failed with errors.
网上搜索到的解决办法:
//将旧版本卸载
npm uninstall node-sass -g
//安装最新版
npm install node-sass -g
但是实际情况是:有好多依赖项,不可能直接卸载的。这个时候呢我们可以更新一下就可以了,如下更新至指定的版本:
npm install node-sass@4.14.1
然后别忘了改一下 package.json
"node-sass": "^4.14.1",
基于nodejs开发的坑太多,慎入。。。
关注我的微信公众号
在公众号里留言交流
投稿邮箱:1052839972@qq.com
庭院深深深几许?杨柳堆烟,帘幕无重数。
玉勒雕鞍游冶处,楼高不见章台路。
雨横风狂三月暮。门掩黄昏,无计留春住。
泪眼问花花不语,乱红飞过秋千去。
如果感觉对您有帮助
欢迎向作者提供捐赠
这将是创作的最大动力