2
votes

I've inherited an existing Angular2 project. When I run NPM start I get a long error beginning with:

Html Webpack Plugin:

TypeError: Cannot read property 'request' of undefined
...

Full error output: http://textuploader.com/d5n25

Any ideas what this means and how I can debug this to find out the file/line of code that is the problem?

Also on Windows 8.1 if that information helps.

1
Did you type webpack first? - wuno
What node and npm versions a used? Similar problem appeared here: github.com/angular/angular-cli/issues/1922 - michelgotta
Did u get the solution ? I am getting same error. - Jeeten Parmar

1 Answers

2
votes

I had the same issue. Mine came from multiple versions of both webpack and HTML Webpack Plugin.

Check with npm ls webpack html-webpack-plugin whether you are having version conflicts and remove the one you don't need.