Answer the question
In order to leave comments, you need to log in
How to add bower/jquery/dist directory to Yii2?
I am creating a Yii2 project from scratch. When trying to access /index.php?r=gii, an error is generated:
Invalid Parameter - yii\base\InvalidParamException
The file or directory to be published does not exist: E:\OpenServer\domains\testsite/vendor\bower/jquery/dist
{
"require": {
"yiisoft/yii2": ">=2.0.6",
"yiisoft/yii2-twig": "^2.0",
"yiisoft/yii2-bootstrap": "~2.0.0"
},
"require-dev": {
"yiisoft/yii2-gii": "^2.0"
},
"config": {
"process-timeout": 1800
},
"extra": {
"asset-installer-paths": {
"npm-asset-library": "vendor/npm",
"bower-asset-library": "vendor/bower"
}
}
}
composer global require "fxp/composer-asset-plugin:~1.1"
Answer the question
In order to leave comments, you need to log in
Specify the root folder for storing bower packages, you can use the file (.bowerrc) in the root of the project:
{
"directory": "vendor/bower"
}
Caught this error when executed
Before installing the plugin
Well, the composer did not pull everything up.
You need to install a plugin
and then runсomposer install
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question