You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
TypeError: Cannot read property 'request' of undefined #683
In my case, there are several webpack versions indeed.
The reason is favicons-webpack-plugin package.
Not sure, why they didn't set webpack as peer dependency.
Removing node_modules and yarn.lock and running yarn again fixed the issue. A lot of diff on yarn.lock though. Not sure what happened, but the issue can be closed for me.
Reacted by Thomas Sileghem, Aleksei Smoliakov, Steve Johns and Ian Ovenden
For future reference: this issue is caused by multiple version of webpack being installed
Make sure you only have one instance by running npm ls webpack:
if it's coming from another package, make sure webpack is a peerDependency and not a dependency of that package
If neither of those, try running npm dedupe or deleting node_modules folder
Activity
diegohaz commentedon May 23, 2017
Removing
node_modules/html-webpack-plugin/node_modules/webpackfolder in my project fixed the issue temporarily.Tried to fork this repo to see if I could fix it, but I couldn't even get tests to pass on a fresh install (even following instructions on https://github.com/jantimon/html-webpack-plugin#contribution).
mastilver commentedon May 24, 2017
I just rerun test on CI, everything is fine...
mastilver commentedon May 24, 2017
Upgrading to [email protected] didn't cause any issue on one of my project
From what I can see, it looks like you have several version of webpack installed, can you run that for me and give me the output:
ocassio commentedon May 24, 2017
In my case, there are several webpack versions indeed.
The reason is favicons-webpack-plugin package.
Not sure, why they didn't set webpack as peer dependency.
diegohaz commentedon May 24, 2017
diegohaz commentedon May 24, 2017
Running webpack build causes this error:

If I remove
node_modules/html-webpack-plugin/node_modules/webpack, everything works.It can be reproduced by cloning my repo https://github.com/diegohaz/arc, upgrading webpack to v2.6 (
yarn upgrade webpack) and runningyarn build.mastilver commentedon May 24, 2017
@diegohaz Can you run:
mastilver commentedon May 24, 2017
@ocassio Do you mind making a PR on: https://github.com/jantimon/favicons-webpack-plugin
diegohaz commentedon May 24, 2017
@mastilver
yarn list webpackonly shows production dependencies.yarn installalso install development dependencies, which includes https://github.com/jantimon/html-webpack-plugin/blob/master/package.json#L54mastilver commentedon May 24, 2017
What I was trying to do with
yarn installis to dedupe packagesI'm not really an expert with
yarnso I believe you ;)I will have a look at your repo tonight if I have some time
diegohaz commentedon May 24, 2017
It could be something related to yarn. Don't know. I'm really confused.
mastilver commentedon May 24, 2017
I believe it is but I wouldn't bet on it ;)
diegohaz commentedon May 24, 2017
Removing
node_modulesandyarn.lockand runningyarnagain fixed the issue. A lot of diff onyarn.lockthough. Not sure what happened, but the issue can be closed for me.ocassio commentedon May 24, 2017
@mastilver Seems like there is one already, but it's kinda stuck:
jantimon/favicons-webpack-plugin#48
mastilver commentedon May 24, 2017
@diegohaz Great news! :)
I'm closing it down then
For future reference: this issue is caused by multiple version of
webpackbeing installedMake sure you only have one instance by running
npm ls webpack:yarnfollow this: TypeError: Cannot read property 'request' of undefined #683 (comment)webpackis apeerDependencyand not adependencyof that packageIf neither of those, try running
npm dedupeor deletingnode_modulesfolderlock commentedon May 31, 2018
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.