I'm trying to configure a PHPStorm project to utilize both remote PHP and a remote Composer. Remote being my Windows Subsystem for Linux (WSL) installation. However, when I initiate any Composer commands from PHPStorm, I get errors. And unfortunately, the errors are not very indicative of the cause or offer a link for additional details.
Errors received in my "Event Log":
12:21 PM Composer
Failed to install packages for ./composer.json.
Show in Log
And in my "Composer Log":
install --no-interaction --no-ansi
/bin/sh: 1: composer: not found
Failed to install packages for ./composer.json.
So far, I've followed the instructions located at:
https://www.jetbrains.com/help/phpstorm/how-to-use-wsl-development-environment-in-product.html
https://www.jetbrains.com/help/phpstorm/configuring-remote-interpreters.html
I also followed the answer at this post to set WSL as my default terminal:
How to use WSL as default terminal in WebStorm or any other JetBrains' products?
In my WSL installation, composer is located at /home/<user>/.local/bin/composer
and is included in my path upon login in my /home/<user>/.profile
file. And I was sure to restart PHPStorm after doing so to ensure it has the updated path. Additionally, running composer install
within my project, on WSL works without issue.
I'm not sure how to determine which terminal or composer file PHPStorm is using. Either it's still trying to find and use a composer on my host Windows install (which doesn't exist) or I'm missing a path which I have to map for WSL.
Any idea how I can obtain more details as to what I have misconfigured?
source https://stackoverflow.com/questions/70657046/configuring-remote-wsl-composer-in-phpstorm
Comments
Post a Comment