web3j-gradle-plugin icon indicating copy to clipboard operation
web3j-gradle-plugin copied to clipboard

version 4.8.8 with gradle 7.3 packageJsonFile issue

Open AlanKang98 opened this issue 4 years ago • 5 comments

Hi, I met this problem all the time

  • What went wrong: A problem was found with the configuration of task ':npmInstall' (type 'NpmInstallTask').

    • In plugin 'com.github.gradle.node.NodePlugin' type 'com.github.gradle.node.npm.task.NpmInstallTask' property 'packageJsonFile' doesn't have a configured value.

      Reason: This property isn't marked as optional and no value has been configured.

      Possible solutions:

      1. Assign a value to 'packageJsonFile'.
      2. Mark property 'packageJsonFile' as optional.

      Please refer to https://docs.gradle.org/7.3/userguide/validation_problems.html#value_not_set for more details about this problem.

  • 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.

It seem like some configuration delete the packageJsonFile when npm installing.

AlanKang98 avatar Dec 01 '21 04:12 AlanKang98

Actually the same error happens already with gradle version 6.x Until it's fixed as a workaround to make it run with at least gradle version 6.x the underlying solidity and node plugins can be set specifically

plugins {
	id "com.github.node-gradle.node" version '3.1.1'
	id "org.web3j.solidity" version '0.3.2'
	...

b-gyula avatar Feb 05 '22 11:02 b-gyula

@AlanKang98, @b-gyula what operating system do you have?

gtebrean avatar Mar 21 '22 13:03 gtebrean

I met the same problem, Gradle 7.4, Windows 10.

nilevols avatar Jun 14 '22 09:06 nilevols

Still raise the error with the following configs and my gradle's version is 7.4.1 `id "org.web3j" version '4.8.7'

id "com.github.node-gradle.node" version '3.1.1'

id "org.web3j.solidity" version '0.3.2'`

RailOuy avatar Jul 17 '22 02:07 RailOuy

Is this issue being reviewed? Just caught it with gradle 7.5.1 on Ubuntu 22.04. Looks like some dependency has task that depends on npmInstall from com.gtihub.node-gradle.node, since web3j-gralde-plugin doesn't require this directly.

theonekeyg avatar Jan 12 '23 17:01 theonekeyg