所以我是通过bower - jQuery UI Sortable安装的。包的文件夹如出一辙地放在“我的资产”文件夹中。然后,我想安装另一个软件包(例如:noty.js和bower install --save noty),我得到了以下信息:
bower noty#* not-cached https://github.com/needim/noty.git#*
bower noty#* resolve https://github.com/needim/noty.git#*
bower fullcalendar#* cached https://github.com/fullcalendar/fullcalendar.git#3.4.0
bower fullcalendar#* validate 3.4.0 against https://github.com/fullcalendar/fullcalendar.git#*
bower noty#* download https://github.com/needim/noty/archive/v3.1.1.tar.gz
bower noty#* extract archive.tar.gz
bower noty#* resolved https://github.com/needim/noty.git#3.1.1
bower ENOTFOUND Package jQuery UI Sortable=jquery-ui-sortable not foundNote__:我也尝试过安装完整日历。
尽管它说它下载了包并提取了archive.tar.gz,但是在我的项目的文件夹中找不到这个包。jQuery UI Sortable还在。我甚至在用它。
bower.json没有被碰过。如果我运行bower install --save noty,它只会说:
bower noty#* cached https://github.com/needim/noty.git#3.1.1
bower noty#* validate 3.1.1 against https://github.com/needim/noty.git#*
bower ENOTFOUND Package jQuery UI Sortable=jquery-ui-sortable not found我有一个指向.bowerrc的resources/assets/bower (因为它是一个Laravel项目)。那我该怎么解决这个问题?
发布于 2017-07-26 14:42:14
造成此错误的原因是,bower使用name构建目录结构并定义包的实际名称。jQuery UI可排序包在bower.json文件中使用大写字母和空格定义名称,如下所示:
{
"name": "jQuery UI Sortable",
"version": "1.0.0",
...这显然不是一个好主意,把大写字母和空格放在包目录名上:

因此,我们需要将名称从jQuery UI Sortable更改为jquery-ui-sortable,去掉空格和大写字母。要做到这一点,我们必须使用<package_installed_name>=<package_list_name>来定义名称,在我们的例子中,这将是:
bower install --save jquery-ui-sortable=jquery-ui-sortable完成此操作后,只需安装noty,它将成功安装它:
bower install noty


在尝试安装具有正确名称的jQuery UI Sortable之前,不要忘记删除bower目录中的jquery-ui-sortable目录。
https://stackoverflow.com/questions/45187298
复制相似问题