克隆 git 存储库后 cakephp 3 无法打开 vendor/autoload.php
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/32073034/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
cakephp 3 failed to open vendor/autoload.php after cloning a git repository
提问by Subhan Ahmed
I have a git repository which is a simple cakephp3 application. (i cant share because that is private). i forked the repository and cloned it to my local directory, but as i open the url it gives me this error:
我有一个 git 存储库,它是一个简单的 cakephp3 应用程序。(我不能分享,因为那是私人的)。我分叉了存储库并将其克隆到我的本地目录,但是当我打开 url 时,它给了我这个错误:
Warning: require(C:\xampp\htdocs\cakephp\shopinator\sms\smsv3\vendor\autoload.php): failed to open stream: No such file or directory in C:\xampp\htdocs\cakephp\shopinator\sms\smsv3\config\bootstrap.php on line 23 Fatal error: require(): Failed opening
required 'C:\xampp\htdocs\cakephp\shopinator\sms\smsv3\vendor\autoload.php' (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\cakephp\shopinator\sms\smsv3\config\bootstrap.php on line 23
I also have composer installed and is recognizable. I'm using git bash.
我也安装了作曲家并且可以识别。我正在使用 git bash。
the same repository is running fine on another machine.
同一个存储库在另一台机器上运行良好。
Any help would be appreciated.
任何帮助,将不胜感激。
Update:I've tried it this way: I'm installing cakephp 3 using composer, it still gives me the same error.
更新:我已经这样试过了:我正在使用 composer 安装 cakephp 3,它仍然给我同样的错误。
composer create-project cakephp/app
I've also tried thisbut no luck.
我也试过这个,但没有运气。
Update:
更新:
with this command
用这个命令
composer create-project --prefer-dist cakephp/app
the fresh installation worked.
全新安装有效。
回答by Subhan Ahmed
I've solved the problem. I downloaded the composer.phar file from packagist.organd executed the following commands in my application root.
我已经解决了这个问题。我从packagist.org下载了 composer.phar 文件 并在我的应用程序根目录中执行了以下命令。
php composer.phar install
Now i don't have that autoload.php issues.
现在我没有那个 autoload.php 问题。