I wrote a GitHub action using TypeScript. Now I wa...
# javascript
v
I wrote a GitHub action using TypeScript. Now I wanted to rewrite the whole thing in Kotlin/JS. I applied
kotlin("js") version "1.3.72"
I called
kotlin { target { nodejs() } }
I declared all the dependencies I had in
package.json
now with
implementation(npm("...", "..."))
Now my current problem is how do I make those dependencies properly usable using Dukat? I've read you can set the project property
kotlin.js.experimental.generateKotlinExternals = true
to enable automatic Dukat magic. But either this is wrong, or I did something wrong or not fully. When I run
gradlew build
, I get this:
Copy code
> Task :generateExternals
events.js:187
      throw er; // Unhandled 'error' event
      ^

Error: write EPIPE
    at afterWriteDispatched (internal/stream_base_commons.js:150:25)
    at writeGeneric (internal/stream_base_commons.js:141:3)
    at Socket._writeGeneric (net.js:771:11)
    at Socket._write (net.js:783:8)
    at doWrite (_stream_writable.js:431:12)
    at writeOrBuffer (_stream_writable.js:415:5)
    at Socket.Writable.write (_stream_writable.js:305:11)
    at Readable.ondata (_stream_readable.js:727:22)
    at Readable.emit (events.js:210:5)
    at Readable.read (_stream_readable.js:525:10)
Emitted 'error' event on Socket instance at:
    at errorOrDestroy (internal/streams/destroy.js:108:12)
    at Socket.onerror (_stream_readable.js:759:7)
    at Socket.emit (events.js:215:7)
    at errorOrDestroy (internal/streams/destroy.js:108:12)
    at onwriteError (_stream_writable.js:446:5)
    at onwrite (_stream_writable.js:473:5)
    at internal/streams/destroy.js:50:7
    at Socket._destroy (net.js:664:5)
    at Socket.destroy (internal/streams/destroy.js:38:8)
    at afterWriteDispatched (internal/stream_base_commons.js:150:17) {
  errno: 'EPIPE',
  code: 'EPIPE',
  syscall: 'write'
}