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

Cannot read property 'hash' of undefined #57

Open
hxfdarling opened this issue Nov 6, 2018 · 18 comments
Open

Cannot read property 'hash' of undefined #57

hxfdarling opened this issue Nov 6, 2018 · 18 comments

Comments

@hxfdarling
Copy link

"html-webpack-plugin": "^4.0.0-beta.2",

get error:

Failed to compile:

TypeError: Cannot read property 'hash' of undefined

  • compiler.js:292 childCompiler.compileTemplates.then
    [imt]/[html-webpack-plugin]/lib/compiler.js:292:30

  • next_tick.js:68 process._tickCallback
    internal/process/next_tick.js:68:7

  • loader.js:745 Function.Module.runMain
    internal/modules/cjs/loader.js:745:11

  • node.js:279 startup
    internal/bootstrap/node.js:279:19

  • node.js:752 bootstrapNodeJSCore
    internal/bootstrap/node.js:752:3

@atdiff
Copy link

atdiff commented Nov 14, 2018

Just encountered the same error

@xeho91
Copy link

xeho91 commented Dec 14, 2018

With "html-webpack-plugin": "^4.0.0-beta.5", issue remains same.

@chulanovskyi
Copy link

Related issue in native repo - html-webpack-plugin

@stephencookdev
Copy link
Owner

I suspect the issue may be linked to this other issue with html-webpack-plugin

@Grewer
Copy link

Grewer commented Jan 21, 2019

A temporary solution, temporarily ignore the detection of HtmlWebpackPlugin

const SpeedMeasurePlugin = require("speed-measure-webpack-plugin");

const smp = new SpeedMeasurePlugin();

const config = smp.wrap({
  mode: 'production',
  entry: [paths.appIndexJs],
  output:{ // omitting},
  plugins:[
    // new HtmlWebpackPlugin({ // omitting}), // remove
    MyPlugin(), // omitting
  ]
})

config.plugins.unshift(
  new HtmlWebpackPlugin({ // omitting }),
)

module.exports = config

@xiaomaer
Copy link

I meet the same error with "html-webpack-plugin": "^4.0.0-beta.5". How to solve?

@geekox86
Copy link

Greetings guys,

First, thank you for the awesome plugin. Very helpful.

Any updates regarding this issue?

@mcfly001
Copy link

A temporary solution, temporarily ignore the detection of HtmlWebpackPlugin

const SpeedMeasurePlugin = require("speed-measure-webpack-plugin");

const smp = new SpeedMeasurePlugin();

const config = smp.wrap({
  mode: 'production',
  entry: [paths.appIndexJs],
  output:{ // omitting},
  plugins:[
    // new HtmlWebpackPlugin({ // omitting}), // remove
    MyPlugin(), // omitting
  ]
})

config.plugins.unshift(
  new HtmlWebpackPlugin({ // omitting }),
)

module.exports = config

but when I config link this, there is no result about how much time of the plugin speed

@taewonyara
Copy link

Any updates on this?

@EnjoyChan
Copy link

I have meet the same problem, any uodates?

@cfkxzsat
Copy link

same here

@jzsplk
Copy link

jzsplk commented Mar 10, 2020

same problem here

@cike8899
Copy link

so I got another issue

URIError: Failed to decode param '/%PUBLIC_URL%/favicon.ico'
    at decodeURIComponent (<anonymous>)

URIError: Failed to decode param '/%PUBLIC_URL%/manifest.json'
    at decodeURIComponent (<anonymous>)

@gaowujian
Copy link

so I got another issue

URIError: Failed to decode param '/%PUBLIC_URL%/favicon.ico'
    at decodeURIComponent (<anonymous>)

URIError: Failed to decode param '/%PUBLIC_URL%/manifest.json'
    at decodeURIComponent (<anonymous>)

same error

@PLQin
Copy link

PLQin commented Jul 17, 2020

see mzgoddard/hard-source-webpack-plugin#416

It might solve your problem

@danvln
Copy link

danvln commented Apr 11, 2021

Same problem. Any solution?

@Spread-More
Copy link

Spread-More commented Oct 23, 2021

same problem
any solution?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests