WebStorm version 2020.3.1

Recently, when I was writing Node.js code using WebStorm, I introduced the Node.js fS-Extra module, which is a direct replacement for the FS module and is very popular. It not only inherits a lot of THE FS module API, but also provides more functions on top of it.

However, when I first used it, I found that after downloading and installing the import, there was no code prompt when using it, which was very uncomfortable. There are a few things you can do to make your code experience better.

To illustrate the problem, I have included both modules, but this is not necessary in actual development:

const fs = require('fs')
const fse = require('fs-extra')
Copy the code

Normal conditions with code hints:

Mouse over the method will also prompt:

There is no code prompt in fS-extra:

“Unparsed function or method” is also displayed when the mouse is over:

Solutions:

Open Files -> Settings -> Languages and Frameworks -> JavaScript -> Libraries and go to the “Downloads” on the right side of the panel:

Wait for the library to load for a while, click on any item in the download library dialog box, then type “fs-extra” to quickly find the corresponding library:

Download install enable OK.

Fs-extra module method: