<@UL1A5BA2X> `npm-publish` doesn't fully support C...
# javascript
a
@Big Chungus
npm-publish
doesn't fully support Configuration Cache. I say "doesn't support fully" because, if I comment out dependency configurations on the packageJson block, everything works fine. But if I include those configs, it fails with the error
Copy code
Execution failed for task ':picortex-sdk-react:assembleJsPackage'.
> Error while evaluating property 'package$npm_publish_gradle_plugin.packageJson.dependencies' of task ':picortex-sdk-react:assembleJsPackage'
   > Failed to query the value of property 'dependencies'.
      > Could not create an instance of type dev.petuska.npm.publish.extension.domain.json.JsonObject.
         > Could not generate a decorated class for type JsonObject.
            > class sun.reflect.generics.reflectiveObjects.TypeVariableImpl cannot be cast to class java.lang.reflect.ParameterizedType (sun.reflect.generics.reflectiveObjects.TypeVariableImpl and java.lang.reflect.ParameterizedType are in module java.base of loader 'bootstrap')
Is there a known current workaround you?? Also, should I create a ticket for this in github?? Tested Versions.
Copy code
npm-publish: 3.0.3
kotlin     : 1.7.10 & 1.7.20
gradle     : 7.5.1
jdk        : openjdk_18
b
Yes, this was already on my todo list, but I'd appreciate your bugreport regardless
Unfortunately no workarounds that I'm aware of.
a
any ETA??
b
None. A bit tight on time these days so had to put my oss efforts on hold. I'll try to look into it before new year though.
Apologies
a
No worries at all. I believe I can help
you do accept pull requests, right??
Contributing.md
is empty. So, I am assuming a plain pull request would suffice. No?
👍 1
b
Ofc. DM me if you get stuck or have questions!
Raise a bug first and then start a pr for it. Other than that do whatever works best for you.
a
roger that
I am having problems just opening the problem in IDEA. I am getting
Copy code
An exception occurred applying plugin request [id: 'plugin.publishing']
> Failed to apply plugin 'plugin.publishing'.
   > Cannot run program "git": error=2, No such file or directory
b
That's weird, did you clone the project or just downloaded zip from the web?
Although for local dev you can safely just comment out that plugin in build.gradle.kts
a
BTW. while fixing this issue, I found a work around (I think its the best approach) to include the dependencies. instead of using the dependencies in the
packageJson
config block, one should use dependencies from
kotlinSourceSets
b
That's not a workaround, but intended usage 😀 pJson dependencies are there only for completeness and shouldn't really be used
a
I agree 100%. I came to realize, I had it because previous versions not bundling those dependencies declared in
sourceSets
looks like they are being declared now