Skip to content
This repository has been archived by the owner on Sep 15, 2024. It is now read-only.

Issues with installation #1

Closed
krzema12 opened this issue Nov 9, 2021 · 5 comments
Closed

Issues with installation #1

krzema12 opened this issue Nov 9, 2021 · 5 comments

Comments

@krzema12
Copy link

krzema12 commented Nov 9, 2021

Hi!

When adding the dependency to my project (I use kotlin("js") plugin):

dependencies {
    testImplementation("io.github.mysticfall:kotlin-react-test:1.1.0")
}

I'm getting this:

Module <managed-automation-ui:frontend-react> has reference public react.dom/HTMLAttributes|null[0], unfortunately neither itself nor its dependencies [
	<org.jetbrains.kotlin-wrappers:kotlin-styled>
	<org.jetbrains.kotlin-wrappers:kotlin-react-dom>
	<org.jetbrains.kotlin-wrappers:kotlin-react-router-dom>
	<org.jetbrains.kotlin-wrappers:kotlin-react>
	<io.ktor:ktor-client-js>
	<org.jetbrains.kotlin-wrappers:kotlin-csstype>
	<org.jetbrains.kotlin-wrappers:kotlin-extensions>
	<org.jetbrains.kotlinx:kotlinx-html>
	<io.ktor:ktor-client-serialization>
	<io.ktor:ktor-client-json>
	<io.ktor:ktor-client-core>
	<io.ktor:ktor-http-cio>
	<io.ktor:ktor-http>
	<io.ktor:ktor-utils>
	<io.ktor:ktor-io>
	<org.jetbrains.kotlinx:kotlinx-coroutines-core>
	<org.jetbrains.kotlin-wrappers:kotlin-css>
	<org.jetbrains.kotlinx:atomicfu>
	<org.jetbrains.kotlinx:kotlinx-serialization-json>
	<org.jetbrains.kotlinx:kotlinx-serialization-core>
	<kotlin>
] contain this declaration
Please check that project configuration is correct and has required dependencies.

Could you advise and maybe create an example project that consumes this library?

Thanks!

PS: I created https://youtrack.jetbrains.com/issue/KT-49610 to track the topic of unit testing in React.

@krzema12
Copy link
Author

I think it's because it's compiled only for IR backend, and I use legacy (still have to, because of no source maps in IR):

@mysticfall
Copy link
Owner

Sorry for the late response. I think you are right about the source of the issue. Do you think it's better to change it to BOTH?

It was my understanding that they are migrating to the IR backend and I don't have a problem with source maps in my main project with that setup too.

Source maps don't seem to work for dependent libraries though but it's probably a different problem.

@krzema12
Copy link
Author

If it's not a problem to try with BOTH, it would be cool. I know it would be better to migrate to IR, but it will take some time after all folks can do it, including us.

mysticfall added a commit that referenced this issue Dec 19, 2021
@mysticfall
Copy link
Owner

Sorry for the delay. I just published 1.2.0 version which should support both compiler backends.

Please reopen this issue if it doesn't work. Thanks!

@krzema12
Copy link
Author

Works, thank you!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants