How can I configure WebStorm to provide code completion for KoaJS?
Asked Answered
P

4

6

Currently, WebStorm reports that KoaJS's methods are undefined. It's a minor, yet persistent annoyance. I've searched on the net and I've searched through WebStorm's configuration dialogs to no avail.

Does anyone use WebStorm with KoaJS and have intellisense/code completion working properly?

enter image description here

Pursuivant answered 19/8, 2015 at 3:21 Comment(0)
M
4

It's a known bug, please follow WEB-11299 for updates

Moonlight answered 20/8, 2015 at 14:11 Comment(0)
K
1

Doing either File > Settings > Languages & Frameworks > JavaScript > Libraries or Click the face in the bottom right corner of the IDE > Libraries in scope. You can Add new libraries that are used for highlighting and code completion. If you are using NPM it's handiest to just add the entire node_modules directory so WebStorm will know about any other packages you install. Or if you don't want to do that, or you don't use NPM, you can just add the koa directory.

Depending on how you create your project I think WebStorm can automatically add the node_modules directory. At least some of my projects have done so without me explicitly doing this.

A bit more reading: http://blog.jetbrains.com/webstorm/2014/07/how-webstorm-works-completion-for-javascript-libraries/

Kazachok answered 19/8, 2015 at 8:21 Comment(0)
J
1

Mac Webstorm 2016.1.1

The following are valid:

Preferences -> Languages & Frameworks -> Javascript -> Libraries -> Download -> Typescript community stubs -> Find koa library -> Download and install -> Apply

worked picture

Jowl answered 29/6, 2016 at 3:25 Comment(0)
H
0

use new koa() instead(with typescript installed),worked for my Intellij IDEA 2016.3.4

Henke answered 22/2, 2017 at 1:36 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.