Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StackOverflowError #490

Open
triplem opened this issue May 14, 2022 · 1 comment
Open

StackOverflowError #490

triplem opened this issue May 14, 2022 · 1 comment

Comments

@triplem
Copy link

triplem commented May 14, 2022

In the kotlin-js-plugin (1.6.21) I am starting the generateExternalsIntegrated and get the following Exception for several packages (trying each alone) react-hook-form or formik. Any help would be appreciated.

My gradle.build.kts contains the following dependencies:

implementation(npm("formik", "2.2.9", generateExternals = true))

or
implementation(npm("react-hook-form", "7.31.1", generateExternals = true))

> Task :generateExternalsIntegrated
Exception in thread "main" java.lang.StackOverflowError
	at kotlin.collections.CollectionsKt__IterablesKt.collectionSizeOrDefault(Iterables.kt:39)
	at org.jetbrains.dukat.nodeIntroduction.ConvertTypeDeclarationsKt.convertToNodeNullable(convertTypeDeclarations.kt:110)
	at org.jetbrains.dukat.nodeIntroduction.ConvertTypeDeclarationsKt.convertToNode(convertTypeDeclarations.kt:107)
	at org.jetbrains.dukat.nodeIntroduction.ConvertTypeDeclarationsKt.convertToNode$default(convertTypeDeclarations.kt:106)
	at org.jetbrains.dukat.nodeIntroduction.ConvertTypeDeclarationsKt.convertToNodeNullable(convertTypeDeclarations.kt:92)
	at org.jetbrains.dukat.nodeIntroduction.ConvertTypeDeclarationsKt.convertToNode(convertTypeDeclarations.kt:107)
	at org.jetbrains.dukat.nodeIntroduction.ConvertTypeDeclarationsKt.convertToNode$default(convertTypeDeclarations.kt:106)
	at org.jetbrains.dukat.nodeIntroduction.ConvertTypeDeclarationsKt.convertToNodeNullable(convertTypeDeclarations.kt:69)
	at org.jetbrains.dukat.nodeIntroduction.ConvertTypeDeclarationsKt.convertToNode(convertTypeDeclarations.kt:107)
	at org.jetbrains.dukat.nodeIntroduction.ConvertTypeDeclarationsKt.convertToNode$default(convertTypeDeclarations.kt:106)
	at org.jetbrains.dukat.nodeIntroduction.DocumentConverter.process(introduceModels.kt:350)
	at org.jetbrains.dukat.nodeIntroduction.DocumentConverter.process$default(introduceModels.kt:323)
	at org.jetbrains.dukat.nodeIntroduction.DocumentConverter$convertMeta$1.invoke(introduceModels.kt:276)
	at org.jetbrains.dukat.nodeIntroduction.DocumentConverter$convertMeta$1.invoke(introduceModels.kt:181)
	at kotlin.text.StringsKt__AppendableKt.appendElement(Appendable.kt:85)
	at kotlin.collections.CollectionsKt___CollectionsKt.joinTo(_Collections.kt:3304)
	at kotlin.collections.CollectionsKt___CollectionsKt.joinToString(_Collections.kt:3321)
	at kotlin.collections.CollectionsKt___CollectionsKt.joinToString$default(_Collections.kt:3320)
	at org.jetbrains.dukat.nodeIntroduction.DocumentConverter.convertMeta(introduceModels.kt:275)
	at org.jetbrains.dukat.nodeIntroduction.DocumentConverter.process(introduceModels.kt:336)
	at org.jetbrains.dukat.nodeIntroduction.DocumentConverter.process(introduceModels.kt:355)
	at org.jetbrains.dukat.nodeIntroduction.DocumentConverter.process$default(introduceModels.kt:323)
	at org.jetbrains.dukat.nodeIntroduction.DocumentConverter.process(introduceModels.kt:350)
	at org.jetbrains.dukat.nodeIntroduction.DocumentConverter.process$default(introduceModels.kt:323)
	at org.jetbrains.dukat.nodeIntroduction.DocumentConverter$convertMeta$1.invoke(introduceModels.kt:276)
	at org.jetbrains.dukat.nodeIntroduction.DocumentConverter$convertMeta$1.invoke(introduceModels.kt:181)
@triplem triplem changed the title StackOverflowError on react-hook-form StackOverflowError May 14, 2022
@bobhy
Copy link

bobhy commented Nov 21, 2022

Check the failing libraries for a wild-card import like import * as _alias_ from _package_, like import * as React from "react" and see my fuller description below: #482 (comment); you may have an easy, though hacky, workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants