Exception 'yii\base\InvalidParamException' with message 'The file or directory to be published does not exist: /data/vendor/bower/jquery/dist'
修改 yii2/base/Application.php 文件中
Yii::setAlias('@bower', $this->_vendorPath . DIRECTORY_SEPARATOR . 'bower');
为
Yii::setAlias('@bower', $this->_vendorPath . DIRECTORY_SEPARATOR . 'bower-asset');
本文介绍了一种常见的Yii2框架中遇到的资源路径错误,并提供了具体的解决方案。通过修改Application.php文件中的路径配置,可以有效解决因路径设置不当导致的资源无法加载的问题。
2037

被折叠的 条评论
为什么被折叠?



