Open N-Molham opened 1 month ago
I too have this issue
I think its a bug in psysh-config.php
. when the composer autoloader is meant to support both, global installation and regular "in-project" installations, it has to be something like
thats not related to npx, but something composer "required" for very long
Had the same issue as @N-Molham in OP, but for me the fix to require_once path in psysh-config.php
file worked. I have only cpx installed globally on this machine, no other composer packages, so probably that's the difference.
Hello,
I love this tool, it is pretty useful and I can see myself using it in multiple ways.
An issue I am facing when trying to run
cpx tinker
, it leads toWarning: require_once(~/.composer/vendor/cpx/cpx/files/../vendor/autoload.php): Failed to open stream: No such file or directory
I did some debugging and found to resolve the issue, I had to modify the
files/psysh-config.php
to the adjust the require_once line to be:Not sure if it because I already had
psys
installed globally before or not.For context:
Installed global packages
### Installed global packages ```json { "installed": [ { "name": "beyondcode/expose", "direct-dependency": true, "homepage": "https://sharedwithexpose.com", "source": "https://github.com/beyondcode/expose/tree/2.6.2", "version": "2.6.2", "description": "Create public URLs for local sites through any firewall and VPN.", "abandoned": false }, { "name": "cpx/cpx", "direct-dependency": true, "homepage": null, "source": "https://github.com/imliam/cpx", "version": "1.0.2", "description": "Run any command from any composer package, even if it's not installed in your project.", "abandoned": false }, { "name": "eriktorsner/wp-bootstrap", "direct-dependency": true, "homepage": "https://github.com/eriktorsner/wp-bootstrap/", "source": "https://github.com/eriktorsner/wp-bootstrap/tree/master", "version": "0.5.2", "description": "Utils for bootstrapping a WordPress installation", "abandoned": false }, { "name": "friendsofphp/php-cs-fixer", "direct-dependency": true, "homepage": null, "source": "https://github.com/FriendsOfPHP/PHP-CS-Fixer/tree/v2.19.3", "version": "v2.19.3", "description": "A tool to automatically fix PHP code style", "abandoned": false }, { "name": "laravel/installer", "direct-dependency": true, "homepage": null, "source": "https://github.com/laravel/installer/tree/v4.2.10", "version": "v4.2.10", "description": "Laravel application installer.", "abandoned": false }, { "name": "laravel/valet", "direct-dependency": true, "homepage": null, "source": "https://github.com/laravel/valet/tree/v4.0.0", "version": "v4.0.0", "description": "A more enjoyable local development experience for Mac.", "abandoned": false }, { "name": "psy/psysh", "direct-dependency": true, "homepage": "http://psysh.org", "source": "https://github.com/bobthecow/psysh/tree/v0.12.4", "version": "v0.12.4", "description": "An interactive shell for modern PHP.", "abandoned": false }, { "name": "squizlabs/php_codesniffer", "direct-dependency": true, "homepage": "https://github.com/squizlabs/PHP_CodeSniffer", "source": "https://github.com/squizlabs/PHP_CodeSniffer", "version": "3.6.2", "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", "abandoned": false }, { "name": "wp-cli/wp-cli-bundle", "direct-dependency": true, "homepage": "https://wp-cli.org", "source": "https://github.com/wp-cli/wp-cli-bundle", "version": "v2.11.0", "description": "WP-CLI bundle package with default commands.", "abandoned": false } ] } ```Update
After trying to fix the require_one path, I am getting different error:
Appreciate your efforts.
Thanks, Nabeel