version 4.8.8 with gradle 7.3 packageJsonFile issue
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:
- Assign a value to 'packageJsonFile'.
- 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.
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'
...
@AlanKang98, @b-gyula what operating system do you have?
I met the same problem, Gradle 7.4, Windows 10.
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'`
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.