Home  >  Article  >  Backend Development  >  yii2我删除了vendor目录,然后重新composer install && composer update就不行了。。。

yii2我删除了vendor目录,然后重新composer install && composer update就不行了。。。

WBOY
WBOYOriginal
2016-06-06 20:32:141494browse

是酱紫的,我把vendor的整个目录都删除了,然后重新执行了

composer install -o --prefer-dist && composer update -o --prefer-dist

,然后网站就运行不了了。。。错误信息无非是

The file or directory to be published does not exist: /www/vendor/npm/bootstrap-markdown

或者

The file or directory to be published does not exist: /www/vendor/bower/jquery/dist

之类的。

注意:手动建立相应目录完全没有卵用。。。我对比过了新建的yii2项目,vendor/bower/jquery下面是有东西的

回复内容:

是酱紫的,我把vendor的整个目录都删除了,然后重新执行了

composer install -o --prefer-dist && composer update -o --prefer-dist

,然后网站就运行不了了。。。错误信息无非是

The file or directory to be published does not exist: /www/vendor/npm/bootstrap-markdown

或者

The file or directory to be published does not exist: /www/vendor/bower/jquery/dist

之类的。

注意:手动建立相应目录完全没有卵用。。。我对比过了新建的yii2项目,vendor/bower/jquery下面是有东西的

问题解决,原因是文件夹名字不对(composer拉取下来之后是bower-assetnpm-asset,需要重命名为bowernpm,然后对每个项目进行bower installnpm install才行

很明显是bower和npm依赖没装成功吧?

你确定安装完成了啦

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn