1

I installed plugin for Intellij-Idea and it doesn`t work. Why can it be? As you can see the require word doesn`t become yellow.enter image description here

And here is my plugin installed: enter image description here

2 Answers2

2

Please make sure to enable Node.js Core library in File | Settings | Languages & Frameworks | Node.js and NPM

lena
  • 90,154
  • 11
  • 145
  • 150
0
  • I like to hover over things that are underlined to give me clues as to where to start. Your "path" and "require" are underlined. Your errors might say Unused local variable 'path' and Unresolved method or function require()

  • You might not have installed node in the current project. If you don't have node installed, try:

    1. npm init to create a package.json file. IntelliJ will walk you through creating the file. You can just press enter all the way through if you want and edit it later.

    2. npm install express --save (replace express with whatever library you are trying to use) to save library in the dependencies list

Installing express

How can I fix WebStorm warning “Unresolved function or method” for “require”

Community
  • 1
  • 1