srs / gradle-node-plugin

Gradle plugin for integrating NodeJS in your build. :rocket:
Apache License 2.0
867 stars 210 forks source link

No value has been specified for property 'packageJsonFile'. #363

Open antgustech opened 4 years ago

antgustech commented 4 years ago

I am using Gradle 6 with the following configuration in the build file:

node { version = '12.14.1' npmVersion = '6.13.6' distBaseUrl = 'https://nodejs.org/dist' download = true workDir = file("${project.buildDir}/app") }

When I run gradle npmInstall, it builds for a while but then exits due to:

No value has been specified for property 'packageJsonFile'.

Where do I set this property and what should it be set to?

deepy commented 4 years ago

There's multiple issues and PRs related to Gradle 6 support e.g. #349

There's also #315 to keep in mind

injecteer commented 4 years ago

I got my setup to work, replacing plugin's npmInstall task with the hand-made one:

    task "npm-install"( type:NpmTask ) {
        group = 'node'
        description = 'Runs npm install'
        workingDir = file '...'
        args = [ 'install' ]
    }

Works both for Gradle 4.10 and 6.x