If you get something like typescript: Cannot find module 'react'
while working on IntelliJ with WSL, there's a chance you haven't set your Node.js interpreter.
- Open Settings and go to
Languages and Frameworks | Node.js
. - Select Node interpreter. Then, set the path of your Node.js installation to something like below:
\\wsl$\Ubuntu\home\my_name\.nvm\versions\node\v14.19.0\bin\node