通过Laravel Installer方法 [英] via Laravel Installer method

查看:267
本文介绍了通过Laravel Installer方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

通常我按照以下命令安装Laravel 5.1:

  composer create-project laravel / laravel  - prefer-dist 

效果很好。



但是我在Via Laravel Installer下的






EDIT:

,我可以在解决问题后确认通过Laravel Installer方法安装的速度比composer快。

解决方案

Composer Assets Plugin在本地安装的是使用不推荐的Composer方法。该插件已经固定,所以运行 composer全局更新获得最新版本的错误修复。



如果这不工作(因为运行上一个命令时可能会遇到同样的错误),请尝试删除全局供应商目录。当运行任何全局Composer命令时,它输出类似将当前目录更改为XXX。删除 XXX / vendor 目录,然后尝试运行该命令。


Normally I do install Laravel 5.1 by following this command regarding to documentation:

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

It works fine.

But I read in the documentation under "Via Laravel Installer" also it is possible to install via Laravel Installer, which is much faster than installing via Composer:

laravel new blog

But to use this method I need to run following command once:

composer global require "laravel/installer=~1.1"

When I do run it I get following errors many times

Deprecation Notice: Composer\Package\Version\VersionParser::parseLinks is deprecated. Use \Composer\Package\Loader\ArrayLoader::parseLinks() instead in phar://C:/ProgramData/Composer/bin/composer.phar/src/Composer/Package/Version/VersionParser.php:226

after many line of same error ./composer.json has been updated appears and it continues with the same line of errors, it ends with following

Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating autoload files

What is wrong with it? Any idea or solution.

My environment: Windows 10, GitBash and cmder console.

Update of composer, I did ran composer self-update also

Snapshot of console


EDIT:
Note, I can confirm after solving the issue that the installation via Laravel Installer method is faster than composer.

解决方案

The Composer Assets Plugin you've installed locally is using a deprecated method of Composer. The plugin is already fixed, so run composer global update to get the latest versions with the bug fix. After it, you should be able to run the command succesfully.

If this doesn't work (as you might get the same error running the previous command), try removing the global vendor directory. When running any global Composer command, it outputs something like "Changed current directory to XXX". Remove the XXX/vendor directory and then try running the command.

这篇关于通过Laravel Installer方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆