简体   繁体   English

我在第一个Laravel项目中收到此错误“无法创建Composer项目:”

[英]I got this error 'Failed to create Composer project:' in my first Laravel project

I create my first Laravel project via PhpStorm but when I write this command in PhpStorm's terminal php artian serve I got this error: 我通过PhpStorm创建了我的第一个Laravel项目,但是当我在PhpStorm的终端php artian serve编写此命令时,出现了以下错误:

'php' is not recognized as an internal or external command, operable program or batch file. 无法将“ php”识别为内部或外部命令,可操作程序或批处理文件。

I have one more problem too: 我也有另一个问题:

Failed to create Composer project: Failed to run 'create-project' command 无法创建Composer项目:无法运行'create-project'命令

在此处输入图片说明

It seems that you system in not recognizing php and git , either they are not installed on your system of they are missed from the environment variable path for the system to recognize where they live. 看来您的系统无法识别phpgit ,或者它们没有安装在您的系统上,或者它们从环境变量路径中丢失了,系统无法识别它们所在的位置。

In the seconds case do this to add path to your PATH variable: 在几秒钟的情况下,请执行以下操作以将路径添加到PATH变量中:

Right click My Computer, go to advanced settings, click Environment Variables then edit the PATH system variable. 右键单击我的电脑,转到高级设置,单击环境变量,然后编辑PATH系统变量。

Add a semi-colon and then the path to your PHP binary, ie ";C:\\wamp\\bin\\php\\php5.6" and do the same for git. 添加一个分号,然后添加到您的PHP二进制文件的路径,即“; C:\\ wamp \\ bin \\ php \\ php5.6”,并对git执行相同的操作。

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

相关问题 作曲家 laravel 创建项目 - composer laravel create project 作曲家创建项目Laravel内存错误 - Composer create-project laravel memory error 在laravel上部署项目后,出现错误 - After I deployed my project on laravel, I got an error 我将我的 Laravel 8 项目上传到 Cpanel,但出现错误 - I uploaded my Laravel 8 project to Cpanel while i got an error 我试图运行一个现有的 laravel 项目。 但是在作曲家更新期间,我收到了这个错误: - I have tried to run an existing laravel project. But during composer update I got this error: 我如何摆脱下面提到的错误并使用homestead为第一个Laravel项目配置作曲家 - How can I get rid of error mentioned below and configure composer for first Laravel project using homestead 为什么我不能使用 composer 创建 Laravel 项目? - Why can't I use composer to create a Laravel project? 使用命令“composer create-project laravel/laravel [我的项目名称]”是创建新 Laravel 项目的正确方法吗? - Is using the command "composer create-project laravel/laravel [name of my project]" the correct way of creating a new Laravel project? Yii2无法与作曲家创建新项目 - Yii2 failed create new project with composer composer create-project没有安装Laravel 5.3 - composer create-project not installing Laravel 5.3
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM