134130 / intellij-mise

mise-en-place JetBrain's IntelliJ platform supports
11 stars 2 forks source link

Error when running a NodeJS program #49

Closed hverlin closed 2 weeks ago

hverlin commented 2 weeks ago

Should the plugin configure the NodeJS setting in IntelliJ to use the same version as mise?

image

when running a Node.js program, I am also getting the following error

java.lang.UnsupportedOperationException
    at java.base/java.util.ImmutableCollections.uoe(ImmutableCollections.java:142)
    at java.base/java.util.ImmutableCollections$AbstractImmutableMap.putAll(ImmutableCollections.java:1080)
    at com.github.l34130.mise.runconfig.NodeRunConfigurationExtension.createLaunchSession(NodeRunConfigurationExtension.kt:40)
    at com.intellij.javascript.nodejs.execution.runConfiguration.NodeRunConfigurationExtensionsManager.createLaunchSession(NodeRunConfigurationExtensionsManager.kt:18)
    at com.jetbrains.nodejs.run.NodeJsRunProfileState.<init>(NodeJsRunProfileState.kt:38)
    at com.jetbrains.nodejs.run.NodeJsRunConfiguration.getState(NodeJsRunConfiguration.java:132)

seems that config.env is immutable

134130 commented 2 weeks ago

Actually, I tested very shallowly for NodeJS support. 😭 I'll check fully about it. Thank you for your report!

hverlin commented 2 weeks ago

Thanks, please let me know if I can help here. I am actually quite interested in having IntelliJ automatically detect the correct NodeJS to use

134130 commented 2 weeks ago

@hverlin Hi, I've added this feature in v2.2.0. It will be available in JetBrains Marketplace soon. Thanks!

hverlin commented 2 weeks ago

Thank you, adding support for automatic Node.js SDK detection here: https://github.com/134130/intellij-mise/pull/58