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

Build falls after upgrading webpack to v4 #860

Closed
finom opened this issue Feb 25, 2018 · 16 comments
Closed

Build falls after upgrading webpack to v4 #860

finom opened this issue Feb 25, 2018 · 16 comments

Comments

@finom
Copy link

finom commented Feb 25, 2018

Subj. The usage of the plugin is regular. I will provide more info if needed.

Error Message & Stack Trace

/Users/finom/Work/djavan-front-end/node_modules/html-webpack-plugin/lib/compiler.js:81
        var outputName = compilation.mainTemplate.applyPluginsWaterfall('asset-path', outputOptions.filename, {
                                                  ^

TypeError: compilation.mainTemplate.applyPluginsWaterfall is not a function
    at /Users/finom/Work/djavan-front-end/node_modules/html-webpack-plugin/lib/compiler.js:81:51
    at compile (/Users/finom/Work/djavan-front-end/node_modules/webpack/lib/Compiler.js:222:11)
    at hooks.afterCompile.callAsync.err (/Users/finom/Work/djavan-front-end/node_modules/webpack/lib/Compiler.js:470:14)
@drihu
Copy link

drihu commented Feb 25, 2018

By now, it's incompatible with webpack v4 (webpack v4 migration plan #816), but they're working on that. It seems @jantimon is working outside and can't commit the new changes. By the moment you can try installing webpack-contrib/html-webpack-plugin. It has committed the new changes til jantimon's back. Uninstall first. It works for me.
npm install -D webpack-contrib/html-webpack-plugin

@MadOgre
Copy link

MadOgre commented Feb 26, 2018

Please fix this. I can't use webpack 4 without it. The webpack-contrib/html-webpack-plugin is broken too

@kaiyoma
Copy link

kaiyoma commented Feb 26, 2018

Ran into this also via yarn check:

error "html-webpack-plugin#webpack@1 || ^2 || ^2.1.0-beta || ^2.2.0-rc || ^3" doesn't satisfy found match of "webpack@4.0.0"

@haishengXie0712
Copy link

haishengXie0712 commented Feb 27, 2018

You can specify that you can use webpack@3.10.0 to support the html-webpack-plugin.
npm install webpack@3.10.0 --save-dev

@ronkorving
Copy link

@haishengXie0712 I think the whole point is that people want to upgrade to Webpack 4 :)

@haishengXie0712
Copy link

It may not be supported for a while, so use it first.

@mateBe95
Copy link

It's still Error: Child compilation failed,

when they are going to fix that issue?

@songololo
Copy link

songololo commented Feb 27, 2018

See the blog post and scroll down to "If you use HtmlWebpackPlugin" for background including a rough timeline.

For others running into non-unique variations of these issues, please use the thumbs-up on the corresponding posts instead of posting new comments or posting "+1".

New non-unique comments spam the inboxes of those subscribed to this thread for the purpose of being informed when it is formally resolved.

@lovetingyuan
Copy link

https://medium.com/webpack/webpack-4-migration-guide-for-plugins-loaders-20a79b927202
compatibility for plugins or loaders is not that satisfactory

@dinfyru
Copy link

dinfyru commented Feb 27, 2018

+1

@wiseguy
Copy link

wiseguy commented Feb 28, 2018

I had to downgrade webpack-dev-server as well. 2.11.0 worked so settled for that.

@yyynnn
Copy link

yyynnn commented Feb 28, 2018

webpack-contrib/html-webpack-plugin install in yarn gives me this error:

An unexpected error occurred: "https://github.com/webpack-contrib/html-webpack-plugin: self signed certificate in certificate chain".

same in npm

@ghost
Copy link

ghost commented Feb 28, 2018

+1
screen shot 2018-02-28 at 15 52 11

@jantimon
Copy link
Owner

We are trying to release html-webpack-plugin 3.0 until the mid/end of this week

@garrettmaring
Copy link

This seems to still be an issue.

"html-webpack-plugin": "^3.2.0",
"webpack": "^4.8.2"

@lock
Copy link

lock bot commented Jun 11, 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.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 11, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests