Error:(28, 1) Groovyc: unable to resolve class com.jetbrains.nodejs.mocha.execution.MochaRunConfiguration

Answered

when i run run > build project in idea plugin project, I get this error

```

Error:(28, 1) Groovyc: unable to resolve class com.jetbrains.nodejs.mocha.execution.MochaRunConfiguration

```

I'm sure this class is in 

```

roroco@roroco /tmp/idea-nodejs $ jar tf /home/roroco/.IntelliJIdea2016.3/config/plugins/NodeJS/lib/NodeJS.jar|gr MochaRunConfiguration
com/jetbrains/nodejs/mocha/execution/MochaRunConfiguration.class
com/jetbrains/nodejs/mocha/execution/MochaRunConfigurationEditor$1.class
com/jetbrains/nodejs/mocha/execution/MochaRunConfigurationEditor$2.class
com/jetbrains/nodejs/mocha/execution/MochaRunConfigurationEditor.class
com/jetbrains/nodejs/mocha/execution/MochaRunConfigurationProducer$TestElementInfo.class
com/jetbrains/nodejs/mocha/execution/MochaRunConfigurationProducer.class

```

and I have import this NodeJS.jar in IDEA PLUGIN SDK, why it still raise this error

0
2 comments

 My tmp solution is use this.class.classloader.loadClass("com.jetbrains.nodejs.mocha.execution.MochaRunConfiguration") instead of import

0

This happens because MochaRunConfiguration implement interfaces from JavaScriptLanguage plugin, so you need to add 

javascript-openapi.jar
JavaScriptLanguage.jar
js-test-common.jar

from <IDEAHOME>/plugins/JavaScriptLanguage/lib to 'Classpath' of IDEA Plugin SDK to fix the problem. I've filed an issue about providing more comprehensible error message in such cases.

0

Please sign in to leave a comment.