Skip to content

Compatibility problem with webpack@3.6 #38

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

Closed
yugasun opened this issue Mar 13, 2018 · 5 comments
Closed

Compatibility problem with webpack@3.6 #38

yugasun opened this issue Mar 13, 2018 · 5 comments

Comments

@yugasun
Copy link

yugasun commented Mar 13, 2018

When I install optimize-css-assets-webpack-plugin@4.0,my project will build failed, below is the errors.

⠋ building for production.../Users/Yuga/Desktop/Developing/compass/node_modules/last-call-webpack-plugin/src/index.js:170
    compiler.hooks.compilation.tap(
                   ^

TypeError: Cannot read property 'compilation' of undefined
    at OptimizeCssAssetsWebpackPlugin.apply (/Users/Yuga/Desktop/Developing/compass/node_modules/last-call-webpack-plugin/src/index.js:170:20)
    at Compiler.apply (/Users/Yuga/Desktop/Developing/compass/node_modules/tapable/lib/Tapable.js:375:16)
    at webpack (/Users/Yuga/Desktop/Developing/compass/node_modules/webpack/lib/webpack.js:33:19)
    at err (/Users/Yuga/Desktop/Developing/compass/build/build.js:19:3)
    at next (/Users/Yuga/Desktop/Developing/compass/node_modules/rimraf/rimraf.js:75:7)
    at FSReqWrap.CB [as oncomplete] (/Users/Yuga/Desktop/Developing/compass/node_modules/rimraf/rimraf.js:111:9)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

this is part of my package.json:

"optimize-css-assets-webpack-plugin": "^4.0.0",
"webpack": "^3.6.0",
@yugasun yugasun closed this as completed Mar 13, 2018
@NMFR
Copy link
Owner

NMFR commented Mar 13, 2018

The v4.0.0 of optimize-css-assets-webpack-plugin requires webpack v4.

@yugasun
Copy link
Author

yugasun commented Mar 13, 2018

@NMFR Many thanks, I have read your source code, and found the reason, so I changed optimize-css-assets-webpack-plugin to 3.2.0.

@edmorley
Copy link

The v4.0.0 of optimize-css-assets-webpack-plugin requires webpack v4.

I see optimize-css-assets-webpack-plugin doesn't have a peerDependency on webpack at the moment. If one were added, it might prevent confusion for cases like this? :-)

@sayhitoarvind
Copy link

yeah I had this issue as well. Changed to 3.2.0 as Yugasun mentioned. Thanks

NMFR added a commit that referenced this issue May 1, 2018
@NMFR
Copy link
Owner

NMFR commented May 1, 2018

peerDependency added, thanks for the suggestion @edmorley :)

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

4 participants