yii2: The file or directory to be published does not exist: .../backend/vendor/bower/bootstrap/dist
After composer update i have this problem with advanced template: [error][yii\base\InvalidParamException] exception ‘yii\base\InvalidParamException’ with message ‘The file or directory to be published does not exist: /var/www/vhosts/*********/httpdocs/backend/vendor/bower/bootstrap/dist’
My composer.json:
{
"name": "yiisoft/yii2-app-advanced",
"description": "Yii 2 Advanced Application Template",
"keywords": [
"yii2",
"framework",
"advanced",
"application template"
],
"homepage": "http://www.yiiframework.com/",
"type": "project",
"license": "BSD-3-Clause",
"support": {
"issues": "https://github.com/yiisoft/yii2/issues?state=open",
"forum": "http://www.yiiframework.com/forum/",
"wiki": "http://www.yiiframework.com/wiki/",
"irc": "irc://irc.freenode.net/yii",
"source": "https://github.com/yiisoft/yii2"
},
"minimum-stability": "stable",
"require": {
"php": ">=5.4.0",
"yiisoft/yii2": "*",
"yiisoft/yii2-bootstrap": "*",
"yiisoft/yii2-swiftmailer": "*",
"kartik-v/yii2-icons": "*",
"kartik-v/yii2-datecontrol": "*",
"kartik-v/yii2-widget-select2": "*",
"kartik-v/yii2-widget-fileinput": "*",
"kartik-v/yii2-editable": "*",
"kartik-v/yii2-grid": "*",
"kartik-v/yii2-mpdf": "*",
"kartik-v/yii2-money": "*",
"wbraganca/yii2-dynamicform": "*",
"philippfrenzel/yii2fullcalendar":"*",
"uran1980/yii2-scroll-to-top": "*",
"2amigos/yii2-ckeditor-widget" : "*",
"alexgx/yii2-phpexcel": "dev-master",
"bedezign/yii2-audit": "dev-master",
"ercling/yii2-pace": "dev-master",
"miloschuman/yii2-highcharts-widget": "dev-master"
},
"require-dev": {
"yiisoft/yii2-codeception": "*",
"yiisoft/yii2-debug": "*",
"yiisoft/yii2-gii": "*",
"yiisoft/yii2-faker": "*"
},
"config": {
"process-timeout": 1800
},
"extra": {
"asset-installer-paths": {
"npm-asset-library": "vendor/npm",
"bower-asset-library": "vendor/bower"
}
}
}
I try:
- delete vendor folder;
- delete composer.lock
- composer self-update
- composer global require “fxp/composer-asset-plugin:1.1.1”
- composer global show -i
fxp/composer-asset-plugin v1.1.1 NPM/Bower Dependency Manager for Composer
- composer global update
- composer global clear-cache
- composer update
Any ideas?
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 24 (10 by maintainers)
Fixed this issue for me.
Looks like this is happening due to the following line:
'vendorPath' => dirname(dirname(__DIR__)) . '/vendor',
missing from the generated common
main.php
config file. No amount of re-updating & cache clearing will bring it back. Seems like it only gets added when callingcreate-project
.None of the mentioned solutions work. You can wipe vendor, clear composer cache, remove the lock file, reinstall composer, wipe the global .composer folder, walk on your hands while juggling watermelons… The project wants the vendor folder to be inside backend or frontend no matter what you do.
What is causing this?
When you’re running install or update w/o prior installing fxp it writes to .lock, vendor and cache. So installing fxp afterwards doesn’t help. You need to clean all these. We’re aware that it’s a huge mess and for 2.1 we plan to do it w/o any global plugins required. For 2.0 it will stay as is…