I'm having an issue that every time I build I get ...
# npm-publish
m
I'm having an issue that every time I build I get the error:
Copy code
Could not determine the dependencies of task ':multiplatform:assembleJsPackage'.
> Cannot query the value of this provider because it has no value available.
I've narrowed it down to
npmPublish
, if I remove the plugin the issue goes away (but then I can't do what I need) It seems to possibly has something to do with the
binaries.library()
vs
binaries.executable()
. Is there something I'm obviously doing wrong? Appreciate the help!
👀 1
b
Can you share your gradle buildfile?
Regarding binaries, the plugin should not do anything for targets that are either using LEGACY compiler or binaries.executable()
m
@Big Chungus thanks for the reply Here's my build file: https://pastebin.com/dmL9nG7P I get a different issue if I use
binaries.library()
that seems either unrelated to npmPublish or could be something to do with a combination of maven-publish and npmPublish on the library project. That error is here: https://pastebin.com/4vKFMLN9 It goes away if I remove my dependency on the other project or if I change to
binaries.executable()
(which then presents this issue). If, however, I change it to
binaries.executable()
, then I get the error I posted in my initial message which does go away if I remove npmPublish as a plugin. This may be a non-issue I guess as probably I can't use an executable as a library in JS
b
Weird, is the project oss so I could have a look? Otherwise could you create a reproducer for me?
Nothing appears to be wrong in your buildfile so far (other than binaries.executable(), but even that should not produce an error).
In the meantime, what npm-publish and kotlin plugin versions are you using?
m
Sorry for the late reply. To reproduce that error simply create a new Kotlin Multiplatform project in IntelliJ (Full Stack Web Application) and use this build file. It's definitely just an incompatibility with npmPublish and the
binaries.executable()
. If I change it back to
binaries.library()
then it works with the exception of the other error I've been unable to solve; that's definitely more complicated. The version of npmPublish is 3.2.1 (or 3.2.0 which behave the same) and Kotlin 1.8.10 or 1.8.0
I did just publish my
common
project without npmPublish enabled and attempted to rebuild again and it seems the error persists. That means the main issue is not caused by npmPublish and the only incompatibility is with the executable which I'm assuming is expected except that it shouldn't prevent building or give a more useful error
b
Thanks. Yes, npm-publish should completely ignore targets with binaries.executable(). Looks like that's currently not the case and needs to be fixed.