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.

Validation error on options.sourceMap when using devtool default

See original GitHub issue

Apologies if this is some other issue, but this keeps showing up when I upgrade to sass-loader 11.0.1, and it seems to be due to the default devtool value getting passed through and then being an invalid option?

  • Operating System: Mac OS X
  • Node Version: v12.16.2
  • NPM Version: yarn 1.22.5
  • webpack Version: 5.36.2
  • sass-loader Version: 11.0.1

Expected Behavior

If I set webpack config devtool setting to eval or eval-source-map in development mode, -or- add EvalSourceMapDevToolPlugin, project builds.

Actual Behavior

I get a validation error: `Module build failed (from ./node_modules/sass-loader/dist/cjs.js): ValidationError: Invalid options object. Sass Loader has been initialized using an options object that does not match the API schema.

  • options.sourceMap should be a boolean.`

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
timstallmanncommented, May 5, 2021

Good call. Creating an example it turns out that the error is in https://github.com/shakacode/bootstrap-loader being incompatible with sass-loader 11.x, not in sass-loader itself. Thanks for helping talk me through it!

0reactions
alexander-akaitcommented, May 5, 2021

hm, maybe you can create example? using EvalSourceMapDevToolPlugin should not break sass-loader

Read more comments on GitHub >

github_iconTop Results From Across the Web

Webpack 5: devtool ValidationError, invalid configuration object
Webpack has been initialized using a configuration object that does not match the API schema. - configuration.devtool should match pattern "^( ...
Read more >
Webpack is producing invalid sourcemaps? #8302 - GitHub
My hypothesis is that the orig_map (which has been essentially passed through to terser from webpack) has incorrect mappings (the "non-minified ...
Read more >
Devtool - webpack
devtool performance production quality (none) build: fastest rebuild: fastest yes bundle eval build: fast rebuild: fastest no generated eval‑cheap‑source‑map build: ok rebuild: fast no transformed
Read more >
Browser console shows DevTools failed to load SourceMap ...
Solution · Go to the developer tools (F12 in the browser); · Select the Cogwheel in the upper right corner; · In the...
Read more >
Debug Node.js Apps using Visual Studio Code
Setting up a project for Node.js debugging is straightforward with VS Code providing appropriate launch configuration defaults and snippets.
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