# Getting Intellij to recognize JS Module from Gradle

**URL:** <https://discuss.kotlinlang.org/t/getting-intellij-to-recognize-js-module-from-gradle/2387>\
**Category:** Support\
**Created:** [March 13, 2017, 12:52pm UTC](https://discuss.kotlinlang.org/t/getting-intellij-to-recognize-js-module-from-gradle/2387 "2017-03-13T12:52:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![pdvrieze](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/pdvrieze/32/1882_2.png) [@pdvrieze](https://discuss.kotlinlang.org/u/pdvrieze)\
**Post date:** [March 13, 2017, 12:52pm UTC](https://discuss.kotlinlang.org/t/getting-intellij-to-recognize-js-module-from-gradle/2387/1 "2017-03-13T12:52:41Z")

</div>

I a project that also includes Android I’m having an issue to get intellij to recognize the fact that my module is a javascript module. It uses the correct library and kotlin2js plugin for gradle, but on sync the module is recognized as targeting the JVM. When I open module settings and manually configure the target to be JavaScript it works, but that is overwritten on gradle sync. Is this a bug, or am I doing something wrong? Btw. It compiles under gradle.

---

<div class="post-metadata">

**Author:** ![yole](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/yole/32/1425_2.png) [@yole](https://discuss.kotlinlang.org/u/yole)\
**Post date:** [March 13, 2017, 5:23pm UTC](https://discuss.kotlinlang.org/t/getting-intellij-to-recognize-js-module-from-gradle/2387/2 "2017-03-13T17:23:42Z")

</div>

This is a bug. Could you please file an issue and attach your build.gradle? Thanks!

---

<div class="post-metadata">

**Author:** ![pdvrieze](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/pdvrieze/32/1882_2.png) [@pdvrieze](https://discuss.kotlinlang.org/u/pdvrieze)\
**Post date:** [March 14, 2017, 9:38am UTC](https://discuss.kotlinlang.org/t/getting-intellij-to-recognize-js-module-from-gradle/2387/3 "2017-03-14T09:38:21Z")

</div>

I’ve filed a bug [https://youtrack.jetbrains.com/issue/IDEA-169600](https://youtrack.jetbrains.com/issue/IDEA-169600) and attached a small subset that exposes this. It really only triggers when the android gradle thing is triggered (the default gradle plugin works).
