Module build failed (from ./node_modules/source-map-loader/dist/cjs.js): TypeError: this.getOptions

Posted zlzbt

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Module build failed (from ./node_modules/source-map-loader/dist/cjs.js): TypeError: this.getOptions相关的知识,希望对你有一定的参考价值。

错误图示如下

执行 npm run build 的时候报错

查了很久的资料只需要修改 webpack.config.js 中的rules

修改如下 

以上是关于Module build failed (from ./node_modules/source-map-loader/dist/cjs.js): TypeError: this.getOptions的主要内容,如果未能解决你的问题,请参考以下文章

Module build failed (from ./node_modules/source-map-loader/dist/cjs.js): TypeError: this.getOptions

Module build failed (from ./node_modules/source-map-loader/dist/cjs.js): TypeError: this.getOptions

Module build failed (from ./node_modules/sass-loader/lib/loader.js): Cannot find module ‘node-sass‘(

Module build failed (from ./node_modules/sass-loader/lib/loader.js): Cannot find module ‘node-sass‘(

webpack报错:Module build failed (from ./node_modules/babel-loader/lib/index.js): Error: Cannot find mo

Module build failed (from ./node_modules/_sass-loader@12.3.0@sass-loader/dist/cjs.js): TypeError: