Search code examples
node.jsangulargrailsgradlegradlew

Caused by: org.gradle.api.InvalidUserDataException: Cannot add task ':client:test' as a task with that name already exists


I can't make grails app run with anuglar2. I have created the app with following command:

grails create-app <NAME> --profile angular2

And when I try to start it up with (./gradlew bootRun --parallel), without any changes, I got following error:

FAILURE: Build failed with an exception.

* Where:
Build file '/*********/client/build.gradle' line: 15

* What went wrong:
A problem occurred evaluating project ':client'.
> Cannot add task ':client:test' as a task with that name already exists.

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

BUILD FAILED

Or more specific:

Caused by: org.gradle.api.InvalidUserDataException: Cannot add task ':client:test' as a task with that name already exists.

I am currently running:

  • Gradle 3.5
  • Grails 3.2.8

I have tried updating node.js and npm

Does the error relates to Grails or does relate to setup of node?


Solution

  • The problem was related to my ~/.gradle folder. I removed the folder and made gradle reinitialize.