Yii2 and Dialog error: "The file or directory to be published does not exist: vendor/bower/bootstrap3-dialog"

Yii2 and Dialog error: "The file or directory to be published does not exist: vendor/bower/bootstrap3-dialog"

我正在尝试以这种方式使用 yii2-dialog 小部件:

echo Dialog::widget([
    'libName' => 'krajeeDialogCust',
    'useNative' => false
]);

echo Html::a(
    'Whosebug',
    'https://whosebug.com/',
    [
        'data-confirm' => 'Do you accept?',
    ]
);

但我收到此错误消息:

The file or directory to be published does not exist: my-directory/vendor/bower/bootstrap3-dialog

错误信息还显示:

DialogBootstrapAsset::register($view);

$this->registerAssets();

'libName' => 'krajeeDialogCust',

如果我使用它,它会起作用(但它不使用小部件):

'useNative' => true

documentation doesn't talk about my problem but the widget's author give a solution 对我不起作用。

我解决了安装 bootstrap3-dialog:

sudo apt-get install npm
sudo npm install -g bower
bower install bootstrap-dialog
composer require kartik-v/yii2-dialog "@dev"