Php 创建Laravel项目时出错

Php 创建Laravel项目时出错,php,laravel,composer-php,Php,Laravel,Composer Php,使用laravel new project命令创建项目时出错。 项目已创建,但执行此操作时会输出错误。在完成项目的手工制作之后,您不能使用php artisan serve运行它 它在制作应用程序时输出的日志为: Crafting application... Loading composer repositories with package information Installing dependencies (including require-dev) from lock file P

使用
laravel new project
命令创建项目时出错。 项目已创建,但执行此操作时会输出错误。在完成项目的手工制作之后,您不能使用
php artisan serve
运行它

它在制作应用程序时输出的日志为:

Crafting application...
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Package operations: 70 installs, 0 updates, 0 removals
  - Installing doctrine/inflector (v1.3.0): Loading from cache
  - Installing doctrine/lexer (v1.0.1): Loading from cache
  - Installing dragonmantank/cron-expression (v2.2.0): Loading from cache
  - Installing erusev/parsedown (1.7.1): Loading from cache
  - Installing vlucas/phpdotenv (v2.5.1): Loading from cache
  - Installing symfony/css-selector (v4.1.3): Downloading (100%)
  - Installing tijsverkoyen/css-to-inline-styles (2.2.1): Loading from cache
  - Installing symfony/polyfill-php72 (v1.8.0): Loading from cache
  - Installing symfony/polyfill-mbstring (v1.8.0): Loading from cache
  - Installing symfony/var-dumper (v4.1.3): Downloading (100%)
  - Installing symfony/routing (v4.1.3): Downloading (100%)
  - Installing symfony/process (v4.1.3): Downloading (100%)
  - Installing symfony/polyfill-ctype (v1.8.0): Loading from cache
  - Installing symfony/http-foundation (v4.1.3): Downloading (100%)
    Failed to download symfony/http-foundation from dist: The archive may contain identical file names with different capitalization (which fails on case insensitive filesystems): ZipArchive::extractTo(C:\Users\manager\Desktop\project/vendor/composer/08eb24bd/symfony-http-foundation-7d93e35\Tests\File\Fixtures\directory/.empty): failed to open stream: Permission denied
    Now trying to download from source
  - Installing symfony/http-foundation (v4.1.3): Cloning 7d93e35476 from cache


  [RuntimeException]
  Failed to clone https://github.com/symfony/http-foundation.git via https, ssh protocols, aborting.

  - https://github.com/symfony/http-foundation.git
    fatal: destination path 'C:\Users\manager\Desktop\project\vendor\symfony\http-foundation' already exists and is not an empty directory.

  - git@github.com:symfony/http-foundation.git
    fatal: destination path 'C:\Users\manager\Desktop\project\vendor\symfony\http-foundation' already exists and is not an empty directory.


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>]...

Application ready! Build something amazing.
PHP Warning:  require(C:\Users\manager\Desktop\project/vendor/autoload.php): failed to open stream: No such file or directory in C:\Users\manager\Desktop\project\artisan on line 18

Warning: require(C:\Users\manager\Desktop\project/vendor/autoload.php): failed to open stream: No such file or directory in C:\Users\manager\Desktop\project\artisan on line 18
PHP Fatal error:  require(): Failed opening required 'C:\Users\manager\Desktop\project/vendor/autoload.php' (include_path='C:\xampp\php\PEAR') in C:\Users\manager\Desktop\project\artisan on line 18

Fatal error: require(): Failed opening required 'C:\Users\manager\Desktop\project/vendor/autoload.php' (include_path='C:\xampp\php\PEAR') in C:\Users\manager\Desktop\project\artisan on line 18
我试图克隆
https://github.com/symfony/http-foundation.git
repo,使用
git-clone就可以很好地工作https://github.com/symfony/http-foundation.git
在同一终端上


我还试图在互联网上查找错误,但到目前为止没有任何帮助。我想为所有未来的项目解决这个问题,尤其是这个项目。

删除供应商目录,然后尝试
composer install
@Quezler您是指我创建的项目中的供应商文件夹还是项目文件夹中的另一个供应商文件夹(
C:\Users\manager\Desktop\project\ventor
)@但这意味着我每次创建新项目时都要这么做,对吗?我正在寻找一个更“确定的解决方案”:\从我所看到的这是一个一次性问题,供应商文件夹中已经存在一个symfony包,因此请尝试上述方法,并让我知道是否失败或成功,而此代码可能会回答问题,提供关于此代码为什么和/或如何回答此问题的附加上下文可提高其长期价值。
php artisan config:cache
composer update