https://kotlinlang.org logo
#getting-started
Title
# getting-started
g

grace

10/28/2023, 4:57 AM
hii all, i want to run kotlin on vscode on mac but have no idea. I have run
brew install kotlin
, installed vscode extension
Kotlin Language
and
Code Runner
, following this tutorial. after I click Run Code, theres a bunch of errors:
Copy code
Memento.kt:61:9: error: unresolved reference: renderer
        renderer = OpenApi3(ApiInfo("Memento API", "v1.0"))
        ^
Memento.kt:61:20: error: unresolved reference: OpenApi3
        renderer = OpenApi3(ApiInfo("Memento API", "v1.0"))
                   ^
Memento.kt:61:29: error: unresolved reference: ApiInfo
        renderer = OpenApi3(ApiInfo("Memento API", "v1.0"))
                            ^
Memento.kt:64:9: error: unresolved reference: descriptionPath
        descriptionPath = "/swagger.json"
        ^
Memento.kt:67:9: error: unresolved reference: security
        security = ApiKeySecurity(<http://Query.int|Query.int>().required("api"), { it == 42 }) // Allow only requests with &api=42
        ^
Memento.kt:67:20: error: unresolved reference: ApiKeySecurity
        security = ApiKeySecurity(<http://Query.int|Query.int>().required("api"), { it == 42 }) // Allow only requests with &api=42
                   ^
Memento.kt:67:35: error: unresolved reference: Query
        security = ApiKeySecurity(<http://Query.int|Query.int>().required("api"), { it == 42 }) // Allow only requests with &api=42
                                  ^
Memento.kt:67:66: error: unresolved reference: it
        security = ApiKeySecurity(<http://Query.int|Query.int>().required("api"), { it == 42 }) // Allow only requests with &api=42
                                                                 ^
Memento.kt:70:9: error: unresolved reference: routes
        routes += ExampleContractRoute()
        ^
Memento.kt:70:16: error: unresolved reference: +=
        routes += ExampleContractRoute()
               ^
Memento.kt:70:19: error: unresolved reference: ExampleContractRoute
        routes += ExampleContractRoute()
                  ^
Memento.kt:73:14: error: unresolved reference: bind
    "/oauth" bind routes(
             ^
Memento.kt:73:19: error: unresolved reference: routes
    "/oauth" bind routes(
                  ^
Memento.kt:74:17: error: unresolved reference: bind
            "/" bind GET to oauthProvider.authFilter.then { Response(OK).body("hello!") },
                ^
Memento.kt:74:22: error: unresolved reference: GET
            "/" bind GET to oauthProvider.authFilter.then { Response(OK).body("hello!") },
                     ^
Memento.kt:74:61: error: unresolved reference: Response
            "/" bind GET to oauthProvider.authFilter.then { Response(OK).body("hello!") },
                                                            ^
Memento.kt:74:70: error: unresolved reference: OK
            "/" bind GET to oauthProvider.authFilter.then { Response(OK).body("hello!") },
                                                                     ^
Memento.kt:75:25: error: unresolved reference: bind
            "/callback" bind GET to oauthProvider.callback
                        ^
Memento.kt:75:30: error: unresolved reference: GET
            "/callback" bind GET to oauthProvider.callback
                             ^
Memento.kt:80:22: error: unresolved reference: HttpHandler
    val printingApp: HttpHandler = PrintRequest().then(app)
                     ^
Memento.kt:80:36: error: unresolved reference: PrintRequest
    val printingApp: HttpHandler = PrintRequest().then(app)
                                   ^
Memento.kt:82:39: error: unresolved reference: Undertow
    val server = printingApp.asServer(Undertow(9000)).start()
how can I run kotlin in any free IDEs? the reason i dont use intellij because its not free
j

Joffrey

10/28/2023, 5:54 AM
As a side note, IntelliJ community edition is free
👍 1
You seem to be using a third party library. Did you declare this dependency in your build tool's configuration (
build.gradle.kts
)?
g

grace

10/28/2023, 6:07 AM
oh yes, i just scrolled down & found the community edition. thanks
🥳 1
🦜 2