Struggling with libraries
Webstorm keeps crashing whenever I try to download a Library with the following error:
Install Node.js Module. Can not install Node.js module: Please specify npm or yarn package
I did report the issue here and, as far as I know, it's being managed already. However, I'd like to know if there's a workaround or if there's anything I can do to be able to use Libraries in scope feature again.
Please sign in to leave a comment.
The only workaround until the issue is fixed is specifying a path to package manager explicitly in Node.js Interpreters dialog, Npm package: field. Does it work for you?
You mean the following? That does not work. I also tried feeding it with homebrew's node/npm versions (which are required on my system but not used) and it still doesn't work, and it's so frustrating 😔
Indeed... WebStorm doesn't use project NPM package manager when downloading TypeScript stubs, and tries to dfetect the installed package manager instead (that fails with your sertup). Logged as https://youtrack.jetbrains.com/issue/WEB-31858, please vote for it to be notified on any progress
Thank you! 😃 I hope this gets fixed soon... It's been a long while already since I experienced and reported the issue. So if I understand correctly, there's no other workaround available, and I can only wait till it's fixed in order to be able to use this feature again.
You can try installing the needed package manually in terminal, by running `npm i @types/<package_name>`... This is unfortunately the only workaround I can think of :(
Thanks Elena! I appreciate your help 😊 and let's hope a fix sooner than later 😅