Hi I am using composite builds in my project and i...
# javascript
b
Hi I am using composite builds in my project and it looks like the
KotlinCompilationNpmResolver
isn't able to resolve it. The
--info
would show me that the nested project's module has been found to then tell me that it cannot find the project
Copy code
Selected primary task ':wire-tests:jsPackageJson' from project :wire-tests
Found project 'project :wire-library:wire-runtime' as substitute for module 'com.squareup.wire:wire-runtime'.
Found project 'project :wire-library:wire-grpc-client' as substitute for module 'com.squareup.wire:wire-grpc-client'.

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':wire-tests:jsPackageJson'.
> Cannot find project :wire-runtime
The stracktrace brings me to https://github.com/JetBrains/kotlin/blob/master/libraries/tools/kotlin-gradle-plugin/src/main/kotlin/org/jetbrains/kotlin/gradle/targets/js/npm/resolver/KotlinCompilationNpmResolver.kt#L185 It looks like the
project.projectRegistry
only has access to the root modules, and none of the `includedBuild`'s modules are in there.
s
Can you share your NPM imports from gradle?
b
s
There currently are some issues when using composite builds with Kotlin/JS. I ran into a similar issue about a week ago, and QA folks acknowledged that it’s a reproducable issue. Check here: https://youtrack.jetbrains.com/issue/KT-36784 – it seems to be almost exactly the same issue as yours. Feel free to give the issue an upvote or enrich it with more information if your case differs from what I described.
b
Yeah exact same stracktrace
I wonder if there is a way to only for JS, not to use the includedBuild but simply go to maven and pick up a regular dependency