Gradle “… occurred starting process 'command 'npm''” on Mac

前端 未结 7 1902

I have MacOS with IntelliJ Idea installed. I\'m using Gradle (gradle-2.4) for building the project. I have NodeJS and NPM installed on the Mac and available from the shell.

相关标签:
7条回答
  • 2021-02-06 22:44

    I had a similar issue and in my case, problem was that when I ran it from IntelliJ, Gradle was unable to access path to find out where node / npm is. I was using the gradle-gulp-plugin and enabling automatic download of node resolved the problem.

    buildscript {
        repositories {
            mavenCentral()
            jcenter()
        }
        dependencies {
            classpath('be.filipblondeel.gradle:gradle-gulp-plugin:0.1')
        }
    }
    node {
        // Version of node to use.
        version = '0.12.0'
    
        // Enabled the automatic download.
        download = true
    }
    
    0 讨论(0)
提交回复
热议问题