其他分享
首页 > 其他分享> > TypeError: this.getOptions is not a function

TypeError: this.getOptions is not a function

作者:互联网

报错信息:

Failed to compile.

./node_modules/submodule/components/button/index.vue?vue&type=style&index=0&id=5f075d98&lang=less (./node_modules/css-loader/dist/cjs.js??ref--10-oneOf-1-1!./node_modules/vue-loader-v16/dist/stylePostLoader.js!./node_modules/postcss-loader/src??ref--10-oneOf-1-2!./node_modules/less-loader/dist/cjs.js??ref--10-oneOf-1-3!./node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/vue-loader-v16/dist??ref--0-1!./node_modules/submodule/components/button/index.vue?vue&type=style&index=0&id=5f075d98&lang=less)
Module build failed (from ./node_modules/less-loader/dist/cjs.js):
TypeError: this.getOptions is not a function
    at Object.lessLoader (G:\Code\test-submodule\node_modules\less-loader\dist\index.js:21:24)

 

截图:

 

 

解决方案:

步骤一:卸载当前安装的less-loader

npm uninstall less-loader


步骤二:安装七点几的版本

npm i less-loader@7.x

 

标签:function,node,TypeError,dist,less,modules,loader,js,getOptions
来源: https://www.cnblogs.com/ViavaCos/p/14828717.html