Updating multiplatform project with js/browser mod...
# multiplatform
j
Updating multiplatform project with js/browser module resulting the error below, I had seen this in the past and don't recall the fix, I believe up/down grading kotlin but that is not working this time, any ideas?
Copy code
org.gradle.api.GradleException: Please initialize the Kotlin/JS target in 'web (:web)'. Use:
kotlin {
    js {
        // To build distributions and run tests for browser or Node.js use one or both of:
        browser()
        nodejs()
    }
}
a
check your
build.gradle.kts
on sub module ":web", looks like the target is not set there
h
You just have to specify the JS target
j
Yeah, I have it set, originally
Copy code
js {
        browser { }
    }
then
Copy code
js {
        browser {
            binaries.executable()
        }
    }
and
Copy code
js {
        browser ()
    }
nothing working
Passing the compiler type worked 😅
Copy code
js(IR) {
        browser { }
    }
or
Copy code
js(LEGACY) {
        browser { }
    }