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

Error during build #22

Closed
ErinMorelli opened this Issue Aug 18, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@ErinMorelli

ErinMorelli commented Aug 18, 2018

I'm encountering this error when I attempt to use the plugin:

/PATH/TO/node_modules/sitemap-webpack-plugin/lib/index.js:121
      compiler.hooks.emit.tapAsync('sitemap-webpack-plugin', function (compilation, callback) {
                     ^

TypeError: Cannot read property 'emit' of undefined
    at SitemapWebpackPlugin.apply (/PATH/TO/node_modules/sitemap-webpack-plugin/lib/index.js:121:22)
@schneidmaster

This comment has been minimized.

Show comment
Hide comment
@schneidmaster

schneidmaster Aug 18, 2018

Owner

Hi there -- what version of webpack and sitemap-webpack-plugin are you using? For webpack 4, use version 0.6; for webpack <= 3, you must use version 0.5.x. (That error sounds like you may be using webpack <= 3 + sitemap-webpack-plugin 0.6, as the compiler.hooks.emit signature was introduced in webpack 4.)

Owner

schneidmaster commented Aug 18, 2018

Hi there -- what version of webpack and sitemap-webpack-plugin are you using? For webpack 4, use version 0.6; for webpack <= 3, you must use version 0.5.x. (That error sounds like you may be using webpack <= 3 + sitemap-webpack-plugin 0.6, as the compiler.hooks.emit signature was introduced in webpack 4.)

@ErinMorelli

This comment has been minimized.

Show comment
Hide comment
@ErinMorelli

ErinMorelli Aug 19, 2018

Ah that was it! Upgraded my webpack to 4 and every thing is working - thanks!

ErinMorelli commented Aug 19, 2018

Ah that was it! Upgraded my webpack to 4 and every thing is working - thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment