Kotlin / Kotlin/kotlinx-nodejs

Compilation error: When accessing module declarations from UMD, they must be marked by both @JsModule and @JsNonModule

Open
#13 2 comments 5 reactions 0 assignees View on GitHub
Dominant language
Kotlin
Stars
224
Forks
18
PR merge metrics
No merged PRs in 30d

Description

I have many compilation errors on 0.0.6 and 0.0.7. For example, on the following lines:
```kt
console.log("Can't load the URL")
val isMac = process.platform == "darwin"
```

Workaround I use is to define my own declarations:
```kt
// console is taken from kotlin stdlib
external val process: dynamic
external val __dirname: dynamic
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the compilation errors from the shown Kotlin declarations against versions 0.0.6 and 0.0.7, then inspect the existing Node.js external declarations for console, process, and __dirname. Done means the example declarations compile without requiring the user's workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin, node.js
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.