简体   繁体   English

Laravel不在供应商文件夹中创建autoload.php?

[英]Laravel not creating autoload.php in vendor folder?

Not sure why but when running laravel new inside a directory, it makes the app but doesn't make the autoload.php file? 不知道为什么,但是在目录中运行laravel new时,它使应用程序生成,但没有使autoload.php文件生成?

I've tried running this 我试过运行

composer dump-autoload

After running the above command Laravel seems to throw a 500 error page. 运行上述命令后,Laravel似乎会抛出500错误页面。 I've tried other things like composer update , composer install 我尝试了其他操作,例如composer updatecomposer install

Running such a command resulted in this 运行这样的命令导致

Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Package operations: 37 installs, 0 updates, 0 removals
  - Installing jakub-onderka/php-console-highlighter (v0.4): Loading from cache

    Invalid zip file, retrying...
  - Installing jakub-onderka/php-console-highlighter (v0.4): Loading from cache

    Invalid zip file, retrying...
  - Installing jakub-onderka/php-console-highlighter (v0.4): Loading from cache
    Failed to download jakub-onderka/php-console-highlighter from dist: 'C:\Users\ash\Desktop\workspace\projects\gaming-site\vendor/jakub-onderka/php-console-highlighter/6664f6e733cabe83723c2d19f66a4784' is not a zip archive.
    Now trying to download from source
  - Installing jakub-onderka/php-console-highlighter (v0.4): Cloning 9f7a229a69


  [RuntimeException]
  Failed to clone https://github.com/JakubOnderka/PHP-Console-Highlighter.git, git was not found, check that it is in
  stalled and in your PATH env.

  'git' is not recognized as an internal or external command,
  operable program or batch file.


install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--ignore-platform-reqs] [--] [<packages>]...

I don't see why its requiring git now, it didn't in the initial install process. 我不知道为什么现在需要git,而在初始安装过程中却没有。 Am I doing something wrong? 难道我做错了什么? This seems very strange for composer. 对于作曲家来说,这似乎很奇怪。

I've even tried running it like this, no luck: 我什至试过像这样运行它,没有运气:

composer create-project --prefer-dist laravel/laravel

Git is a tool used by many developers to pull the required files in order for their app to work. Git是许多开发人员用来提取所需文件以使其应用程序运行的工具。

Just head on to git-scm.com and install git. 只需转到git-scm.com并安装git。

I believe that you cannot use laravel without git installed on your system. 我相信,如果未在系统上安装git,则无法使用laravel。

On this case, laravel is trying to download a PHP Console Highlighter which was hosted on github.com. 在这种情况下,laravel试图下载托管在github.com上的PHP Console Highlighter。 It uses a "git clone" command to get a copy of that repository. 它使用“ git clone”命令来获取该存储库的副本。 That is why you need to install git. 这就是为什么您需要安装git的原因。

Git is a revision control system used to track changes in computer files. Git是一个修订控制系统,用于跟踪计算机文件中的更改。 It's a tool to manage your code & file history while co-ordinating work remotely on those files with others. 它是管理您的代码和文件历史记录的工具,同时可以与其他人远程协调这些文件的工作。 Just install git and get going. 只需安装git即可。 You can download it at www.git-scm.com With laravel 5.7 version you will need git 您可以在www.git-scm.com上下载。使用laravel 5.7版本,您将需要git

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM