2
votes

I'm installing Yii2 in the way that shows the Getting Started tutorial:

composer global require "fxp/composer-asset-plugin:~1.1.1"
composer create-project --prefer-dist yiisoft/yii2-app-basic basic

When I try to access localhost/YiiTutorial/basic/web I get this error:

Invalid Parameter – yii\base\InvalidParamException The file or directory to be published does not exist: C:\wamp\www\YiiTutorial\basic\vendor\bower/jquery/dist

In the tutorial says that is nothing to edit... it should work right out of the box... what I'm missing?

If I download the package and place it in the same folder, it works perfect, but I want to install it from composer!

5
Did you run 'composer update' ? - crafter

5 Answers

3
votes

Inside vendor/bower folder it's another one called bower-asset. Copy this folder content (some other folders named bootstrap, jquery, etc...) and move them to vender/bower.

0
votes
  • Mainly if not issue regarding to vendor installation so please give permission to your /assets and /runtime folers of your projects and try to run again.
0
votes

In your vendor folder you should rename bower-asset to bower .

OR you can use the following

make sure that you have the following in your composer.json:

0
votes

it a recent bug. update your fxp plugin to latest version (1.1.1) and clear composer's cache and try :

composer self-update
composer global update
composer update
0
votes

I have encountered this kind of problem lately, the issue is in your composer it missing the asset-plugins which allows managing bower and npm package dependencies through Composer. Just run this command, you only need to run this command once for all. You can read the yii2 docs. Yii2 Installation

composer global require "fxp/composer-asset-plugin:^1.2.0"