【问题标题】:Composer: eonasdan/bootstrap-datetimepicker installed into components [duplicate]作曲家:eonasdan/bootstrap-datetimepicker 安装到组件中[重复]
【发布时间】:2015-12-20 05:48:45
【问题描述】:

对于我的 CakePHP 应用程序,我正在尝试通过 composer 安装 eonasdan/bootstrap-datetimepicker

但是,与所有其他软件包不同,它及其依赖项安装到 components 而不是 vendor/components

$ composer require eonasdan/bootstrap-datetimepicker
Using version dev-master for eonasdan/bootstrap-datetimepicker
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
  - Installing symfony/process (v2.7.5)
    Loading from cache

  - Installing kriswallsmith/assetic (v1.3.0)
    Loading from cache

  - Installing robloach/component-installer (0.2.3)
    Loading from cache

  - Installing moment/moment (2.10.6)
    Loading from cache

  - Installing eonasdan/bootstrap-datetimepicker (dev-master fd8bd86)
    Cloning fd8bd86dd78f789fb742798b7d49aba0a957af62

kriswallsmith/assetic suggests installing twig/twig (Assetic provides the integration with the Twig templating engine)
kriswallsmith/assetic suggests installing leafo/lessphp (Assetic provides the integration with the lessphp LESS compiler)
kriswallsmith/assetic suggests installing leafo/scssphp (Assetic provides the integration with the scssphp SCSS compiler)
kriswallsmith/assetic suggests installing ptachoire/cssembed (Assetic provides the integration with phpcssembed to embed data uris)
kriswallsmith/assetic suggests installing leafo/scssphp-compass (Assetic provides the integration with the SCSS compass plugin)
kriswallsmith/assetic suggests installing patchwork/jsqueeze (Assetic provides the integration with the JSqueeze JavaScript compressor)
Writing lock file
Generating autoload files
> Cake\Composer\Installer\PluginInstaller::postAutoloadDump
> ComponentInstaller\Installer::postAutoloadDump
Compiling component files

$ ls -l components/
totale 624
drwxr-xr-x 4 mirko mirko   4096 ott 10 15:07 bootstrap-datetimepicker
drwxr-xr-x 2 mirko mirko   4096 ott 10 15:07 jquery
drwxr-xr-x 4 mirko mirko   4096 ott 10 15:07 moment
-rw-r--r-- 1 mirko mirko 537897 ott 10 15:07 require-built.js
-rw-r--r-- 1 mirko mirko    611 ott 10 15:07 require.config.js
-rw-r--r-- 1 mirko mirko      0 ott 10 15:07 require.css
-rw-r--r-- 1 mirko mirko  81714 ott 10 15:07 require.js

顺便说一句,我注意到 jQuery 和 Moment 都重新安装了(因为它们是 bootstrap-datetimepicker 的依赖项),尽管我已经安装了它们(出于我的原因)。

为什么会这样?我该如何解决?

【问题讨论】:

  • 我也有同样的问题。

标签: composer-php bootstrap-datetimepicker


【解决方案1】:

我发现了一个类似的问题。你可以编辑你的component-dir:

{
    "require": {
        "components/jquery": "*"
     },
     "config": {
          "component-dir": "web/assets"
     }
}

更多信息Composer installs jQuery components in wrong directory

【讨论】:

  • 感谢@Vinicius,标记为重复。
猜你喜欢
  • 1970-01-01
  • 2014-08-10
  • 1970-01-01
  • 1970-01-01
  • 2021-08-07
  • 2018-10-21
  • 2015-09-17
  • 1970-01-01
  • 2021-04-11
相关资源
最近更新 更多