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

Error: webpack.optimize.UglifyJsPlugin has been removed #1

Open
McPringle opened this issue Mar 25, 2018 · 1 comment
Open

Error: webpack.optimize.UglifyJsPlugin has been removed #1

McPringle opened this issue Mar 25, 2018 · 1 comment

Comments

@McPringle
Copy link

After i cloned this repo I started the backend and the frontend as shown in the README file:

$ ./gradlew backend:run
$ ./gradlew -t frontend:run

While the backend runs fine, the frontend raises an exception:

> Task :frontend:webpack-run 
webpack-dev-server exited with exit code 1, see /Users/mcpringle/GitHub/other/kotlin-todomvc/frontend/build/logs/webpack-dev-server.log
/Users/mcpringle/GitHub/other/kotlin-todomvc/frontend/build/node_modules/webpack/lib/webpack.js:162
                        throw new RemovedPluginError(errorMessage);
                        ^

Error: webpack.optimize.UglifyJsPlugin has been removed, please use config.optimization.minimize instead.
    at Object.get [as UglifyJsPlugin] (/Users/mcpringle/GitHub/other/kotlin-todomvc/frontend/build/node_modules/webpack/lib/webpack.js:162:10)
    at Object.<anonymous> (/Users/mcpringle/GitHub/other/kotlin-todomvc/frontend/build/webpack.config.js:42:44)
    at Module._compile (module.js:624:30)
    at Object.Module._extensions..js (module.js:635:10)
    at Module.load (module.js:545:32)
    at tryModuleLoad (module.js:508:12)
    at Function.Module._load (module.js:500:3)
    at Module.require (module.js:568:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/Users/mcpringle/GitHub/other/kotlin-todomvc/frontend/build/webpack-dev-server-run.js:22:14)


FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':frontend:webpack-run'.
> webpack-dev-server startup failed

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 5s
16 actionable tasks: 2 executed, 14 up-to-date

I run macOS High Sierra 10.13.3 and tried Java 8u152 and 9.0.4.

@gyulavoros
Copy link
Owner

I cannot reproduce. Can you take a look at the kotlin-todomvc/frontend/build/node_modules/webpack/package.json file and check the version number? For me it's [email protected] and it works fine, but it seems that in webpack 4, things have changed.

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

2 participants