WebPack TypeError: Cannot read property 'request' of undefined

匿名 (未验证) 提交于 2019-12-03 09:02:45

问题:

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:

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.



易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!