• 首页 首页 icon
  • 工具库 工具库 icon
    • IP查询 IP查询 icon
  • 内容库 内容库 icon
    • 快讯库 快讯库 icon
    • 精品库 精品库 icon
    • 问答库 问答库 icon
  • 更多 更多 icon
    • 服务条款 服务条款 icon

antd ERROR in ./node_modules/antd/lib/button/style/index.less javascriptEnabled

武飞扬头像
酒窝傻儿
帮助1

学习参考 https://www.jianshu.com/p/815c3810c7a4
仿照 antd写法,安装npm i -D less less-loader
莫名其妙报错了,如下:

ERROR in ./node_modules/antd/lib/button/style/index.less (./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js??ruleSet[1].rules[2].use[2]!./node_modules/antd/lib/button/style/index.less)
Module build failed (from ./node_modules/less-loader/dist/cjs.js):
ValidationError: Invalid options object. Less Loader has been initialized using an options object that does not match the API schema.
 - options has an unknown property 'javascriptEnabled'. These properties are valid:
   object { lessOptions?, additionalData?, sourceMap?, webpackImporter?, implementation? }
    at validate (C:\Users\87715\study\node_modules\schema-utils\dist\validate.js:105:11)
    at Object.lessLoader (C:\Users\87715\study\node_modules\less-loader\dist\index.js:26:29)
 @ ./node_modules/antd/lib/button/style/index.less 61:4-74:5 8:6-160 22:17-24 26:7-21 58:25-39 59:36-47 59:50-64 63:6-73:7 64:54-65 64:68-82 70:42-53 70:56-70 72:21-28 83:0-130 83:0-130 84:22-29 84:33-47 84:50-64
 @ ./node_modules/antd/lib/button/style/index.js 5:0-23
 @ ./src/index.tsx 1:0-31

ERROR in ./node_modules/antd/lib/style/default.less (./node_modules/css-loader/dist/cjs.js!./node_modules/less-loader/dist/cjs.js??ruleSet[1].rules[2].use[2]!./node_modules/antd/lib/style/default.less)
Module build failed (from ./node_modules/less-loader/dist/cjs.js):
ValidationError: Invalid options object. Less Loader has been initialized using an options object that does not match the API schema.
 - options has an unknown property 'javascriptEnabled'. These properties are valid:
   object { lessOptions?, additionalData?, sourceMap?, webpackImporter?, implementation? }
    at validate (C:\Users\87715\study\node_modules\schema-utils\dist\validate.js:105:11)
    at Object.lessLoader (C:\Users\87715\study\node_modules\less-loader\dist\index.js:26:29)
 @ ./node_modules/antd/lib/style/default.less 8:6-156 22:17-24 26:7-21 58:25-39 59:36-47 59:50-64 63:6-73:7 64:54-65 64:68-82 70:42-53 70:56-70 72:21-28 83:0-126 83:0-126 84:22-29 84:33-47 84:50-64 61:4-74:5
 @ ./node_modules/antd/lib/button/style/index.js 3:0-35
 @ ./src/index.tsx 1:0-31
学新通

问到度娘 有https://blog.csdn.net/weixin_38049458/article/details/79222315
这问题很相似,试试执行还不行

折磨还是折磨大半天

最后卸载 npm uninstall less less-loader

后来 不想再安装,干脆直接执行一下,通过!!!
学新通
没有less less-loader,没有异常

醉了。。。

卸载后已经没有less,对吗?还是通啊!求教!orz

这篇好文章是转载于:学新通技术网

  • 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
  • 本站站名: 学新通技术网
  • 本文地址: /boutique/detail/tanhgggaef
系列文章
更多 icon
同类精品
更多 icon
继续加载