Home > Software engineering >  Running a projetct with IntelliJ gives "Execution failed for task ':npmInstall'."
Running a projetct with IntelliJ gives "Execution failed for task ':npmInstall'."

Time:10-01

I have a jhipster project that runs just fine when started by the command line "./gradlew" (Ubuntu 20.04.3) but when I start the debbug from the IntelliJ (community) it returns the follow message:

What went wrong:
Execution failed for task ':npmInstall'.
A problem occurred starting process 'command 'npm''

And I need to run it on IntelliJ to use breakpoints and debug.

What I have tried:

  • I have checked the java version on the IntelliJ compiller
  • I have the PATH's set correct (I can run other projects)

CodePudding user response:

After trying to redefine things, deleting the "node-modules" folder, 'invalidating and restart' on intelliJ and even checking-out the entire project from git, what did the trick was to change the block on build.gradle, from:

if (project.hasProperty("nodeInstall")) {
    node {
        version = "14.16.0"
        npmVersion = "7.8.0"
        download = true
    }
}

to

node {
    version = "14.16.0"
    npmVersion = "7.8.0"
    download = true
}

That fixed the problem and now I can debbug using intelliJ

  • Related