question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ValidationError: Invalid options object. Stylus Loader has been initialized using an options object that does not match the API schema.

See original GitHub issue

Version

4.5.7

Environment info

"stylus-loader": "^4.1.1",

Steps to reproduce

install stylus-loader@4.x

npm run serve

What is expected?

stylus compile successfully

What is actually happening?

 ERROR  Failed to compile with 1 errors                                                                                                                                10:42:34 PM

 error  in ./src/App.vue?vue&type=style&index=0&id=7ba5bd90&lang=stylus&scoped=true

Module build failed (from ./node_modules/stylus-loader/dist/cjs.js):
ValidationError: Invalid options object. Stylus Loader has been initialized using an options object that does not match the API schema.
 - options has an unknown property 'preferPathResolver'. These properties are valid:
   object { stylusOptions?, sourceMap?, webpackImporter?, additionalData? }

image

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

16reactions
vinayakkulkarnicommented, Nov 5, 2020
- "stylus-loader": "^4.2.0",
+ "stylus-loader": "^3.0.2",

This solves it, but I believe we should ensure that v4.x is supported while bundling the app

7reactions
zf1998commented, Oct 14, 2020

I also encountered this problem, using stylus-loader v3 can solve it

Read more comments on GitHub >

github_iconTop Results From Across the Web

Invalid options object. Stylus Loader has been initialized using ...
Stylus Loader has been initialized using an options object that does not match the API schema. - options has an unknown property ' ......
Read more >
invalid options object. sass loader has been initialized using ...
Syntax Error : ValidationError: Invalid options object. Sass Loader has been initialized using an options object that does not match the API schema....
Read more >
ValidationError: Invalid options object. Stylus Loader has been ...
Stylus Loader has been initialized using an options object that does not match the API schema. - options has an unknown property ' ......
Read more >
[Solved]-sass-loader 9.0.x & vue: ValidationError
Coding example for the question sass-loader 9.0.x & vue: ValidationError: Invalid options object. Sass Loader has been initialized using an options ...
Read more >
To v5 from v4 - webpack
Upgrade webpack 4 and its plugins/loaders · Make sure your build has no errors or warnings · Make sure to use mode ·...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found