I recently started using WebStorm on Windows to work on a Vue.JS-based project, and ran into an irritating issue when trying to run things with WSL and asdf:-
- Webstorm Npm Update
- Webstorm Npm Command
- Node Js Npm
- Webstorm Npm
- Webstorm Npm Tool Window Missing
- Webstorm Npm Install Error
Webstorm Npm Update
After a bunch of time searching fruitlessly for an answer while resisting the urge to throw things out the window, I figured I’d try something else.
Webstorm Npm Command
Use WebStorm’ built-in npm and search for karma-cli, add -g option before hitting Install for global installation. Or use built-in Terminal to install karma-cli with: Karma configuration. To run new tests with Karma, you need to have a Karma configuration file (learn more about it). Im just starting with grunt in webstorm (on windows) and can't call npm (node plugin is installed and enabled, node.exe is in the system path). Npm init what command line tool outputs: module.js.
- After following AngularJs2 official Hero tutorial with VisualStudio Code, I'd like to code and debug using WebStorm+Chrome on Windows 10. For that, I did as below; Install Chrome JetBrains IDE extension. After reading WebStorm tutorial, I might need to add -debug Node option.
- Windows配置一路流程: Nodejs 官网下载Nodejs后一直下一步安装结束。为防止c盘不够用,将npm目录迁移至其他盘。安装完成之后打开cmd,输入node -v检.
Things to note:-
- I am not an expert when it comes to node, npm, asdf or anything involving JavaScript
- This may not be a great way to do it, I don’t know if this will make other things explode
Node Js Npm
When you first select the node interpreter under Run/Debug Configurations, WebStorm will run which node and get the path that way. When using asdf, this comes back as ~/.asdf/shims/node
:-
Webstorm Npm
This sets the Package manager option to something that doesn’t exist. This in turn apparently confuses the shit out of WebStorm, because it then tries to find the node_modules
directory based on this path, fails, barfs and makes a mess everywhere.
Figuring that the way asdf shims interpreters was the cause, I went digging to see if I could find where npm-cli.js
was under my ~/.asdf
directory:-
Hmm, we might be onto something here.
Aha!
Okay, so what happens if we give WebStorm this path instead?
The Package manager path now looks right at least… but does it work?
Webstorm Npm Tool Window Missing
Success!
Webstorm Npm Install Error
As I said before, I’m far from an expert when it comes to anything involving JavaScript so I have no idea if this is the right way to do things. But it works for me, so if you’re running into the same problem then this might help.