https://kotlinlang.org logo
#npm-publish
Title
# npm-publish
a

andylamax

01/23/2023, 2:15 PM
Hi, I am having problems updating to 3.2.0. I already migrated my project to kotlin 1.8.0, But i get an error like so
Copy code
build/tmp/publicPackageJson/package.json (No such file or directory)
Putting an empty
package.json
results also in the error
Copy code
Configuration cache state could not be cached: field '__extraDependencies$npm_publish_gradle_plugin__' from type 'dev.petuska.npm.publish.task.NpmAssembleTask': error writing value of type 'org.gradle.api.internal.provider.DefaultListProperty'
> Cannot invoke "com.google.gson.JsonObject.getAsJsonObject(String)" because "json" is null
any known workarrounds??
b

Big Chungus

01/23/2023, 4:20 PM
Odd, that dir is used by kgp to put publicPackageJson task output. What task are you running to get the error? Is project OSS for me to look at?
As a tmp workaround, run publicPackageJson task before any npm tasks.
In any case, could you raise an issue on gh to track this. Clearly something is borked and needs fixing.
a

andylamax

01/24/2023, 11:03 AM
Your workaround does work. Thanks alot. I'll just set up a task dependency