Установка версии 2.0.12

Различные вопросы по установке и настройке фреймворка, конфигурции веб-сервера и IDE.
Ответить
slo_nik
Сообщения: 344
Зарегистрирован: 2013.10.07, 19:08

Установка версии 2.0.12

Сообщение slo_nik »

Добрый вечер.
Попытался установить версию 2.0.12 и получил ошибку
Invalid Parameter – yii\base\InvalidParamException

The file or directory to be published does not exist: /home/slonik/localhost/www/test-new-yii2/vendor/bower/jquery/dist
Ставил через composer

Код: Выделить всё

composer create-project --prefer-dist yiisoft/yii2-app-basic test-new-yii2
В консоли ошибок не заметил

Код: Выделить всё

Installing yiisoft/yii2-app-basic (2.0.12)
  - Installing yiisoft/yii2-app-basic (2.0.12) Loading from cache
Created project in test-yii2
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 63 installs, 0 updates, 0 removals     
  - Installing yiisoft/yii2-composer (2.0.5) Loading from cache
  - Installing swiftmailer/swiftmailer (v5.4.8) Loading from cache
  - Installing bower-asset/jquery (2.2.4) Loading from cache
  - Installing bower-asset/yii2-pjax (v2.0.6) Loading from cache
  - Installing bower-asset/punycode (v1.3.2) Loading from cache
  - Installing cebe/markdown (1.1.1) Loading from cache
  - Installing ezyang/htmlpurifier (v4.9.3) Loading from cache
  - Installing bower-asset/jquery.inputmask (3.3.6) Loading from cache
  - Installing yiisoft/yii2 (2.0.12) Loading from cache
  - Installing yiisoft/yii2-swiftmailer (2.0.7) Loading from cache
  - Installing bower-asset/bootstrap (v3.3.7) Loading from cache
  - Installing yiisoft/yii2-bootstrap (2.0.6) Loading from cache
  - Installing yiisoft/yii2-debug (2.0.9) Loading from cache
  - Installing bower-asset/typeahead.js (v0.11.1) Loading from cache
  - Installing phpspec/php-diff (v1.1.0) Loading from cache
  - Installing yiisoft/yii2-gii (2.0.5) Loading from cache
  - Installing fzaninotto/faker (v1.6.0) Loading from cache
  - Installing yiisoft/yii2-faker (2.0.3) Loading from cache
  - Installing psr/log (1.0.2) Loading from cache
  - Installing symfony/debug (v3.3.2) Loading from cache
  - Installing symfony/polyfill-mbstring (v1.3.0) Loading from cache
  - Installing symfony/console (v3.3.2) Loading from cache
  - Installing stecman/symfony-console-completion (0.7.0) Loading from cache
  - Installing sebastian/diff (1.4.3) Loading from cache
  - Installing sebastian/recursion-context (3.0.0) Loading from cache
  - Installing sebastian/exporter (3.1.0) Loading from cache
  - Installing sebastian/comparator (2.0.0) Loading from cache
  - Installing behat/gherkin (v4.4.5) Loading from cache
  - Installing symfony/dom-crawler (v3.3.2) Loading from cache
  - Installing symfony/css-selector (v3.3.2) Loading from cache
  - Installing symfony/browser-kit (v3.3.2) Loading from cache
  - Installing symfony/yaml (v3.3.2) Loading from cache
  - Installing symfony/event-dispatcher (v3.3.2) Loading from cache
  - Installing symfony/finder (v3.3.2) Loading from cache
  - Installing psr/http-message (1.0.1) Loading from cache
  - Installing guzzlehttp/psr7 (1.4.2) Loading from cache
  - Installing doctrine/instantiator (1.0.5) Loading from cache
  - Installing phpunit/php-text-template (1.2.1) Loading from cache
  - Installing phpunit/phpunit-mock-objects (4.0.1) Loading from cache
  - Installing theseer/tokenizer (1.1.0) Loading from cache
  - Installing sebastian/version (2.0.1) Loading from cache
  - Installing sebastian/environment (3.0.3) Loading from cache
  - Installing sebastian/code-unit-reverse-lookup (1.0.1) Loading from cache
  - Installing phpunit/php-token-stream (1.4.11) Loading from cache
  - Installing phpunit/php-file-iterator (1.4.2) Loading from cache
  - Installing phpunit/php-code-coverage (5.2.1) Loading from cache
  - Installing sebastian/resource-operations (1.0.0) Loading from cache
  - Installing sebastian/object-reflector (1.1.1) Loading from cache
  - Installing sebastian/object-enumerator (3.0.2) Loading from cache
  - Installing sebastian/global-state (2.0.0) Loading from cache
  - Installing phpunit/php-timer (1.0.9) Loading from cache
  - Installing webmozart/assert (1.2.0) Loading from cache
  - Installing phpdocumentor/reflection-common (1.0) Loading from cache
  - Installing phpdocumentor/type-resolver (0.2.1) Loading from cache
  - Installing phpdocumentor/reflection-docblock (3.1.1) Loading from cache
  - Installing phpspec/prophecy (v1.7.0) Loading from cache
  - Installing phar-io/version (1.0.1) Loading from cache
  - Installing phar-io/manifest (1.0.1) Loading from cache
  - Installing myclabs/deep-copy (1.6.1) Loading from cache
  - Installing phpunit/phpunit (6.2.1) Loading from cache
  - Installing codeception/base (2.3.3) Loading from cache
  - Installing codeception/verify (0.3.3) Loading from cache
  - Installing codeception/specify (0.4.6) Loading from cache
symfony/console suggests installing symfony/filesystem ()
symfony/console suggests installing symfony/process ()
symfony/browser-kit suggests installing symfony/process ()
symfony/event-dispatcher suggests installing symfony/dependency-injection ()
symfony/event-dispatcher suggests installing symfony/http-kernel ()
phpunit/phpunit-mock-objects suggests installing ext-soap (*)
phpunit/php-code-coverage suggests installing ext-xdebug (^2.5.3)
sebastian/global-state suggests installing ext-uopz (*)
phpunit/phpunit suggests installing phpunit/php-invoker (^1.1)
phpunit/phpunit suggests installing ext-xdebug (*)
codeception/base suggests installing flow/jsonpath (For using JSONPath in REST module)
codeception/base suggests installing phpseclib/phpseclib (for SFTP option in FTP Module)
codeception/base suggests installing league/factory-muffin (For DataFactory module)
codeception/base suggests installing league/factory-muffin-faker (For Faker support in DataFactory module)
codeception/base suggests installing symfony/phpunit-bridge (For phpunit-bridge support)
Writing lock file
Generating autoload files
> yii\composer\Installer::postCreateProject
chmod('runtime', 0777)...done.
chmod('web/assets', 0777)...done.
chmod('yii', 0755)...done.
В composer указал версию, как написано здесь, сначала была указана версия "yiisoft/yii2": "~2.0.5"
Когда в composer.json изменил версию - удалил всё из vendor и сделал в директории проекта

Код: Выделить всё

composer update
Composer установлен глобально в системе (ubuntu 16.04).
Если переименовать в vendor директорию bower-assets в bower - всё работает.
Как избежать в будущем подобной ошибки, что я упустил?
Аватара пользователя
SiZE
Сообщения: 2813
Зарегистрирован: 2011.09.21, 12:39
Откуда: Perm
Контактная информация:

Re: Установка версии 2.0.12

Сообщение SiZE »

Оно?

Код: Выделить всё

    "config": {
        "fxp-asset": {
            "installer-paths": {
                "npm-asset-library": "vendor/npm",
                "bower-asset-library": "vendor/bower"
            }
        }
    },
slo_nik
Сообщения: 344
Зарегистрирован: 2013.10.07, 19:08

Re: Установка версии 2.0.12

Сообщение slo_nik »

SiZE писал(а): 2017.06.07, 08:29 Оно?

Код: Выделить всё

    "config": {
        "fxp-asset": {
            "installer-paths": {
                "npm-asset-library": "vendor/npm",
                "bower-asset-library": "vendor/bower"
            }
        }
    },
В composer.json проекта есть такое

Код: Выделить всё

"config": {
        "fxp-asset":{
            "installer-paths": {
                "npm-asset-library": "vendor/npm",
                "bower-asset-library": "vendor/bower"
            }
        }
    },
В файле .bowerrc

Код: Выделить всё

{
    "directory" : "vendor/bower-asset"
}
При создании проекта с нуля через composer создаётся именно bower-asset. Почему - непонятно.
Обновить глобально composer?
Аватара пользователя
Йож
Сообщения: 574
Зарегистрирован: 2015.08.26, 03:05

Re: Установка версии 2.0.12

Сообщение Йож »

Обновить компосер, обновить fxp plugin, удалить папку вендор, сделать update. Что-то конкретно из этого помогло, не помню точно - что.
Аватара пользователя
SiZE
Сообщения: 2813
Зарегистрирован: 2011.09.21, 12:39
Откуда: Perm
Контактная информация:

Re: Установка версии 2.0.12

Сообщение SiZE »

Йож писал(а): 2017.06.07, 20:31 обновить fxp plugin
Да, кстати fxp то свежий стоит?
slo_nik
Сообщения: 344
Зарегистрирован: 2013.10.07, 19:08

Re: Установка версии 2.0.12

Сообщение slo_nik »

SiZE писал(а): 2017.06.07, 21:44
Йож писал(а): 2017.06.07, 20:31 обновить fxp plugin
Да, кстати fxp то свежий стоит?

Код: Выделить всё

"name": "fxp/composer-asset-plugin",
            "version": "v1.2.2",
Если глобально обновить composer это не поломает старые проекты?
Аватара пользователя
SiZE
Сообщения: 2813
Зарегистрирован: 2011.09.21, 12:39
Откуда: Perm
Контактная информация:

Re: Установка версии 2.0.12

Сообщение SiZE »

Поидее это всего лишь прокладка для управления зависимостями в других пакетах. Сами зависимости же в composer.json фреймворка прописаны. В любом случае ты можешь откатиться когда захочешь.
slo_nik
Сообщения: 344
Зарегистрирован: 2013.10.07, 19:08

Re: Установка версии 2.0.12

Сообщение slo_nik »

Благодарю всех откликнувшихся.
Обновил composer и fxp plugin - всё заработало. Старые проекты обновились без проблем, вроде ничего не сломалось.
Ответить