当我尝试在htdocs
文件夹中安装新项目时,出现此错误:
[Composer \ Repository \ InvalidRepositoryException]无效的存储库 C:\ xampp \ htdocs / vendor / composer / installed.json中的数据,程序包可以 无法加载:[Seld \ Json Lint \ ParsingException] “ C:\ xampp \ htdocs / vendor / composer / installed.json”不包含 第1行的有效JSON Parse错误:
\\\\\\\\\\\\ ^ ^预期之一:“ STRING”,“ NUMBER”,“ NULL”, 'TRUE','FALSE','{','['
我的安装命令是:
composer create-project --prefer-dist laravel/laravel CruiseBag "5.6.*"
答案 0 :(得分:1)
在Windows上安装Laravel
打开窗口的CMD或PowerShell
cd C:\ xampp \ htdocs
使用Composer安装Laravel
composer create-project --prefer-dist laravel / laravel CruiseBag“ 5.6”
答案 1 :(得分:1)
// first composer download, then composer install
// Or command use:
composer global require "laravel/installer"
//then
composer create-project --prefer-dist laravel/laravel blog "5.6.*"