Closed p2made closed 5 years ago
My first go at a projet using bootstrap 4 is failling with...
Invalid Argument – yii\base\InvalidArgumentException The file or directory to be published does not exist: /path/to/vendor/npm/bootstrap/dist
The following trace points to yiisoft/yii2-bootstrap4/src/Nav.php which loads yiisoft/yii2-bootstrap4/src/BootstrapAsset.php which has...
yiisoft/yii2-bootstrap4/src/Nav.php
yiisoft/yii2-bootstrap4/src/BootstrapAsset.php
class BootstrapAsset extends AssetBundle { public $sourcePath = '@npm/bootstrap/dist'; public $css = [ 'css/bootstrap.css', ]; }
However the NPM package is installed at vendor/npm-asset which is in keeping with yiisoft/yii2-bootstrap4/composer.json which has...
vendor/npm-asset
yiisoft/yii2-bootstrap4/composer.json
"require": { "yiisoft/yii2": "~2.0", "npm-asset/bootstrap": "^4.3" },
Shouldn't that $sourcePath be @npm-asset/bootstrap/dist?
$sourcePath
@npm-asset/bootstrap/dist
No, because https://www.yiiframework.com/doc/guide/2.0/en/concept-aliases#predefined-aliases
Set correct path like this.
My first go at a projet using bootstrap 4 is failling with...
The following trace points to
yiisoft/yii2-bootstrap4/src/Nav.php
which loadsyiisoft/yii2-bootstrap4/src/BootstrapAsset.php
which has...However the NPM package is installed at
vendor/npm-asset
which is in keeping withyiisoft/yii2-bootstrap4/composer.json
which has...Shouldn't that
$sourcePath
be@npm-asset/bootstrap/dist
?