ValidationError on `lessLoaderOptions.javascriptEnabled`
See original GitHub issue2 days ago craco-less upgraded less-loader from 5 to 6 that has a braking change.
This causes the following error:
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?, prependData?, appendData?, sourceMap?, implementation? }
There are 2 fixes that can be done:
- Pin the version of
craco-less
to 1.16.0 - Use the new
lessOptions
as described here
Issue Analytics
- State:
- Created 3 years ago
- Reactions:6
- Comments:9 (6 by maintainers)
Top Results From Across the Web
Webpack less-loader javascriptEnabled Error - Stack Overflow
I was getting this error when I moved from less-loader version 6.0.0 to version 6.1.0 when trying to load my Ant Design library...
Read more >validationerror: invalid options object. less loader has been ...
Notice that the javascriptEnabled flag is not under the top-level options object, but it, ... DocSpring/craco-antdValidationError on `lessLoaderOptions.
Read more >rsuite/rsuite - Gitter
node_modules/less-loader/dist/cjs.js): ValidationError: Invalid options object. ... { loader: 'less-loader', options: { lessOptions: { javascriptEnabled: ...
Read more >less-loader options has an unknown property 'javascriptenabled'
less-loader options has an unknown property 'javascriptenabled'技术、学习、经验文章掘金 ... node_modules/sass-loader/dist/cjs.js): ValidationError: Invalid.
Read more >antd 踩坑之javascriptEnabled配置 - CSDN博客
vue.config.js 配置javascriptEnabled 后依然报错css: { loaderOptions: { less: { javascriptEnabled: true } } } ValidationError: Invalid options ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@ndbroadbent the issue wasn’t fixed, can you please re-open it?
As I mentioned earlier, there are only 2 options:
craco-less
to 1.16.0 (usesless-loader@5
) - a hotfix, done in #34less-loader@6
(see changes here) - the real fix, but can brake code for current users@ndbroadbent I’m having the same error mentioned by @daniel-hauser also in the new version
1.15.0