Pycharm Django Sass Processor with WSL Follow
I am using Pycharm with Wndows Substystem for Linux. I have setup a Django Project within WSL and added the environment config.
The Django project uses django sass processor. When I run the project using the Pycharm runner, it throws an error while rendering the template claiming that the sass path cannot be found. The project works fine when I run on a native terminal but does not work within Pycharm, which is unfortunate since I cannot use the debugger.
I have tried debugging this issue for months now with no luck. I suspect that there is a path variable that is not getting set correctly within Pycharm but I may be wrong. Any help is welcome.
Please sign in to leave a comment.
Any chance you could provide an example project so we can take a closer look?
Let me try to recreate this issue in a new project.
Sergey Karpov Okay I have recreated the issue in a new django project. https://github.com/actlikewill/streak Check it out. As I said, running on Pycharm doesn't work properly, I get a template error specifically with saying that it cannot find the sass folder. Running on a native terminal works. I am using Windows Substytem for Linux with Ubuntu 20.04 running on Windows 10.
Sorry for the big delay.
I tried reproducing the issue with your project both with a local and with a WSL interpreter and it worked fine.
I had to reinstall the latest version of nodejs and npm due to some issues, I don't know if it makes the difference. What versions of Python, nodejs and npm do you use?
Hey Thanks. I figured out that the issue was I was using nvm (node version manager) in my machine. Pycharm was not using my user shell configuration when running and this resulted in the error. I understand that Pycharm uses the login shell configuration which did not contain the path to my nvm configuration. which is injected only in a local terminal shell when I start a new session. I fixed it by removing nvm and installing node globally.Thanks for taking the time though. Much appreciated.