New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeError: this.getOptions is not a function #517
Comments
npm i style-loader@2.0.0 -D |
You need webpack v5 to use the latest version of style-loader, please read changelog |
I'm getting this error when using Webpack 5.59.1 and the latest version of style-loader. Do I still need to downgrade to style-loader@2? (Also happens with Webpack 5 and style-loader 2.) |
Run |
Gives the return |
Do you have |
Nope. |
Downgrading Webpack to 4 and style-loader to 2 resolves it. (I write “resolves it” but it's obviously not a solution.) |
Run |
|
Problem in |
...and with
|
Update |
Bingo. Perfect. Thanks! |
Thanks man, it helped me a lot! <3 |
Without style-loader because it needs to be updated together with webpack. webpack-contrib/style-loader#517
./src/index.css i m getting this error while executing please help me out |
take your laptop and throw it into the ocean. seriously though, i have the same problem. |
Have you read the comments above which show the solution? |
ERROR in ./app/javascript/stylesheets/application.scss (./node_modules/css-loader/dist/cjs.js??ref--6-1!./node_modules/postcss-loader/dist/cjs.js??ref--6-2!./node_modules/sass-loader/dist/cjs.js??ref--6-3!./app/javascript/stylesheets/application.scss) |
Module build failed (from ./node_modules/style-loader/dist/cjs.js):
TypeError: this.getOptions is not a function
at Object.loader (.../node_modules/style-loader/dist/index.js:18:24)
It looks like #501 dropped loader-utils as a dependency where this function came from, and instead tries to call this.getOptions which doesnt exist.
The text was updated successfully, but these errors were encountered: