amireh / happypack

Happiness in the form of faster webpack build times.
MIT License
4.23k stars 124 forks source link

Potential issue with happypack & hard-source-webpack-plugin #234

Closed v17al closed 6 years ago

v17al commented 6 years ago

I've posted this on the hard-source-webpack-plugin repo, but given how their source works where they just pass along the parameters given to them, it's possible that happypack might be at fault -- not sure though, I just really want to switch to these two libs to speed up ours builds. I have spent a bit of time but haven't found anything, if you are able to think of a potential issue I'd be glad to look into it and create a PR if I am able to fix it :+1:! Here's the issue I filed on the other repo:

On the latest NPM version of hard-source-webpack-plugin (including the alphas) and happypack, I get the following once hard-source-webpack-plugin is added to my list of plugins (works fine without it):

Happy[ts]: Version: 5.0.0. Threads: 2
<<project location>>\node_modules\webpack\node_modules\enhanced-resolve\lib\Resolver.js:32
                throw new Error("Signature changed: context parameter added");
                ^

Error: Signature changed: context parameter added
    at Resolver.resolve (<<project location>>\node_modules\webpack\node_modules\enhanced-resolve\lib\Resolver.js:32:9)
    at Resolver.resolver.resolve (<<project location>>\node_modules\hard-source-webpack-plugin\lib\enhanced-resolve-cache.js:329:22)
    at resolveLoader (<<project location>>\node_modules\happypack\lib\WebpackUtils.js:150:17)
    at <<project location>>\node_modules\happypack\lib\WebpackUtils.js:131:7
    at <<project location>>\node_modules\happypack\node_modules\async\lib\async.js:713:13
    at async.forEachOf.async.eachOf (<<project location>>\node_modules\happypack\node_modules\async\lib\async.js:233:13)
    at _parallel (<<project location>>\node_modules\happypack\node_modules\async\lib\async.js:712:9)
    at Object.async.parallel (<<project location>>\node_modules\happypack\node_modules\async\lib\async.js:726:9)
    at Object.exports.resolveLoaders (<<project location>>\node_modules\happypack\lib\WebpackUtils.js:127:9)
    at resolveLoaders (<<project location>>\node_modules\happypack\lib\HappyPlugin.js:139:20)
    at <<project location>>\node_modules\happypack\node_modules\async\lib\async.js:713:13
    at iterate (<<project location>>\node_modules\happypack\node_modules\async\lib\async.js:262:13)
    at async.forEachOfSeries.async.eachOfSeries (<<project location>>\node_modules\happypack\node_modules\async\lib\async.js:281:9)
    at _parallel (<<project location>>\node_modules\happypack\node_modules\async\lib\async.js:712:9)
    at Object.async.series (<<project location>>\node_modules\happypack\node_modules\async\lib\async.js:734:9)
    at HappyPlugin.start (<<project location>>\node_modules\happypack\lib\HappyPlugin.js:128:9)

npm ERR! Windows_NT 10.0.16299

Any ideas?

xilaraux commented 6 years ago

@v17al did you find out the root of the issue?

v17al commented 6 years ago

@xilaraux Unfortunately I had to switch tasks for the time being - I can close this and reopen once I get back to that branch if you like.

v17al commented 6 years ago

@xilaraux Looks like I needed to upgrade to node >= 8

Huai-Kang commented 6 years ago

@v17al I'm using node 8.11.3, but I got the same error when use both happypack and hard-source-webpack-plugin : (

elamperti commented 6 years ago

Same here with node 9.3.0

dorado-lmz commented 5 years ago

Here is the root of the issue:

https://github.com/mzgoddard/hard-source-webpack-plugin/issues/439