Skip to content
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

Issue with sass-loader (this.getResolve is not a function) #79

Closed
ngryman opened this issue Nov 8, 2019 · 8 comments · Fixed by #99
Closed

Issue with sass-loader (this.getResolve is not a function) #79

ngryman opened this issue Nov 8, 2019 · 8 comments · Fixed by #99

Comments

@ngryman
Copy link

ngryman commented Nov 8, 2019

Hey folks,

I've facing the following issue with sass-loader:

Error Details
ERROR in ./app.scss (./node_modules/thread-loader/dist/cjs.js!./node_modules/css-loader/dist/cjs.js!./node_modules/sass-loader/dist/cjs.js!./app.scss)
Module build failed (from ./node_modules/thread-loader/dist/cjs.js):
Thread Loader (Worker 0)
this.getResolve is not a function
    at PoolWorker.fromErrorObj (/Users/ngryman/Projects/Open Source/Code/thread-sass-loaders-bug/node_modules/thread-loader/dist/WorkerPool.js:262:12)
    at /Users/ngryman/Projects/Open Source/Code/thread-sass-loaders-bug/node_modules/thread-loader/dist/WorkerPool.js:204:29
    at mapSeries (/Users/ngryman/Projects/Open Source/Code/thread-sass-loaders-bug/node_modules/neo-async/async.js:3625:14)
    at PoolWorker.onWorkerMessage (/Users/ngryman/Projects/Open Source/Code/thread-sass-loaders-bug/node_modules/thread-loader/dist/WorkerPool.js:170:35)
    at readBuffer (/Users/ngryman/Projects/Open Source/Code/thread-sass-loaders-bug/node_modules/thread-loader/dist/WorkerPool.js:152:14)
    at Object.loader (/Users/ngryman/Projects/Open Source/Code/thread-sass-loaders-bug/node_modules/sass-loader/dist/index.js:52:26)
 @ ./app.scss 1:14-155

When I remove thread-loader from the loaders chain, it works correctly. Here is a very simple repo to reproduce that issue: https://github.com/ngryman/thread-sass-loaders-bug.

I've also already surfaced that issue in the sass-loader repo as I'm not sure which package is buggy.

@alexander-akait
Copy link
Member

Yes, feel free to send a PR

@alexander-akait
Copy link
Member

Should be very easy to fix

@ngryman
Copy link
Author

ngryman commented Nov 8, 2019

@evilebottnawi I'd be glad to open a PR but unfortunately I'm not very familiar with thread-loader or Webpack's internals. Could you provide me with some help so I can open that PR? Thanks.

@alexander-akait
Copy link
Member

https://github.com/webpack-contrib/thread-loader/blob/master/src/index.js#L23 just add getResolver: this.getResolver should be work

@rainke
Copy link

rainke commented Mar 3, 2020

I use MiniCssExtractPlugin.loader still has the error

@rainke
Copy link

rainke commented Mar 3, 2020

@Lsnsh
Copy link

Lsnsh commented Apr 24, 2020

Encountered the same problem, maybe you can look at this issue:
webpack-contrib/sass-loader#761 (comment)

@ryansully
Copy link

The same error occurs for less-loader 6.0.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants