Untitled.kt
# javascript
h
Untitled.kt
i
I don’t know, if it is slack issue, but when I copied you config, I get error like “Expecting an element” Looks like some invisible elements exists in scripts in marked places If you faced with this issue, try to remove it Without it, your config works well for me
h
I updated it with the latest version I got (same problem).
I copied this straight from the kotlin-js-demo-1.3.50: https://github.com/Kotlin/kotlin-js-demo-1.3.50
i
What error do you get?
h
I don’t get an error. The JS package I import is just not found.
It gets downloaded into the node_modules in the build folder, but there is no detection of it
Even if I import a package that is built with TypeScript and I enable Dukat I don’t get anything
The thing is, this used to work and I haven’t really updated anything except IntelliJ IDEA itself
It doesn’t matter which NPM library I try to import. Nothing is detected. 😕
i
Ohh, do you mean, that you don’t have external declarations for your package? Now it works in experimental mode You can enable it by configuring flag
kotlin.js.experimental.generateKotlinExternals=true
in
gradle.properties
In 1.3.50 it triggers only on
types
field in module’s
package.json
In incoming version it triggers additionally on
typings
field (actually for
firebase
for example)
h
ohh
That explains things
I got the left-pad working, but anything else with index.d.ts didn’t
Is the
typings
support in the EAP?
Although, I can’t get
@types/jszip
to work, even though that uses
types
in the
package.json
Ok, I got a bit further. I can see that it generates external declarations, but they end up in the <projectname>-test under build/externals
The types don’t get picked up by IntelliJ, but compiling and running works
i
Yes,
typings
should work in EAP For
types
it works like you say
h
Any idea why I can’t get the EAP version to be recognized by Gradle?
Copy code
buildscript {
    repositories {
        maven(url = "<https://dl.bintray.com/kotlin/kotlin-eap>")
        mavenCentral()
        mavenLocal()
    }
    dependencies {
        kotlin("kotlin-gradle-plugin", "1.3.60-eap-143")
    }
}

plugins {
    id("org.jetbrains.kotlin.js") version "1.3.60-eap-143"
}
And I get:
Copy code
Build file '/Users/hellman/Sources/Kotlin/kotlinjs-firebase-demo/build.gradle.kts' line: 12

* What went wrong:
Plugin [id: 'org.jetbrains.kotlin.js', version: '1.3.60-eap-143'] was not found in any of the following sources:

- Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
- Plugin Repositories (could not resolve plugin artifact 'org.jetbrains.kotlin.js:org.jetbrains.kotlin.js.gradle.plugin:1.3.60-eap-143')
  Searched in the following repositories:
    Gradle Central Plugin Repository
Ok, got an answer to that in #general