bcrypt.js
bcrypt.js copied to clipboard
Remove var module declaration from minimal-env.js
Howdy,
Of course it is up to your discretion if you want to make this change. I just want to bring it to your attention.
Once I installed bcrypt for password hash checking, the module.exports support in WebStorm IDE is failing.
I found others had been running into this as well:
- https://stackoverflow.com/questions/43864913/intellij-inspection-saying-module-exports-does-not-exist-for-nodejs
bcrypt.js/externs/minimal-env.js
I've gone into /node_modules/ and marked minimal-env as plain text so this suppresses the issue in my current environment, but I'll need to remember it for each workstation I use and each project where I pull this in. Minor annoyance, but thought you might be able to consider avoiding the var module; declaration.
Thanks.
Yes! Was about to create an issue about this, doesn't seem like its getting anyone's attention though.
Yes, very annoying. Of course, it's not your package's fault.
For anyone coming here from Google searches, a quick fix is to right click minimal-env.js
and choose 'Mark as Plain Text'.
Yes, very annoying. Of course, it's not your package's fault. For anyone coming here from Google searches, a quick fix is to right click
minimal-env.js
and choose 'Mark as Plain Text'.
@vdavid It works for me. Thanks!
@vdavid Yes. I explained that you can right click minimal-env.js and 'Mark as Plain Text' in the original issue. I'm not sure if "not your package's fault" is quite accurate. Most IDEs are designed to crawl packages and provide syntax highlighting and type hinting.
This issue is a report that this declaration causes folks that use an IDE with type hinting to have to take a couple extra steps for any project where this package is used. I was suggesting avoiding it or removing it to make things a little easier on that subset of users. If the author chooses not to, that's their call and is fine by me. :) But, the fact that folks end up here via Google is due to this minimal-env.js
script. My opinion of course.
Not just var module but also process