我似乎无法使用以下命令安装Laravel:composer create-project laravel/laravel laravel-testing --prefer-dist
因为它不断抛出以下错误:
[InvalidArgumentException]
Composer could not find the config file: C:\Users\Kieran\AppData\Roaming\Co
mposer\vendor\bin
To initialize a project, please create a composer.json file as described in
the http://getcomposer.org/ "Getting Started" section
以下路径中不存在供应商和 bin 文件夹,因此我在其中创建了文件夹vendor
,然后是bin
仍然没有运气:
C:\Users\Kieran\AppData\Roaming\Composer\vendor\bin
我做错了什么?
答案 0 :(得分:4)
我设法解决了这个问题。我不得不删除composer
环境变量。可在此处找到:Control Panel>System>Edit the system environment variables>Environment variables>composer>delete
删除后,我可以运行我想要的命令,没有任何错误,并按预期工作:composer create-project laravel/laravel laravel-testing --prefer-dist