安装时jquery.inputmask包找不到

安装报错 · asion · 于 6年前 发布 · 6946 次阅读
  • 安装命令
    composer global require "fxp/composer-asset-plugin:^1.2.0"
    composer create-project fancyecommerce/fecshop-app-advanced  fecshop 1.0.2.9
    
  • 问题 安装过程中出现:

    Loading composer repositories with package information
    Updating dependencies (including require-dev)
    Your requirements could not be resolved to an installable set of packages.                               
    
    Problem 1
      - yiisoft/yii2 2.0.9 requires bower-asset/jquery.inputmask ~3.2.2 -> no matching package found.
      - yiisoft/yii2 2.0.8 requires bower-asset/jquery.inputmask ~3.2.2 -> no matching package found.
      - yiisoft/yii2 2.0.7 requires bower-asset/jquery.inputmask ~3.2.2 -> no matching package found.
      - yiisoft/yii2 2.0.6 requires bower-asset/jquery.inputmask 3.1.* -> no matching package found.
      - yiisoft/yii2 2.0.12 requires bower-asset/jquery.inputmask ~3.2.2 | ~3.3.5 -> no matching package found.
      - yiisoft/yii2 2.0.11.2 requires bower-asset/jquery.inputmask ~3.2.2 | ~3.3.3 -> no matching package found.
      - yiisoft/yii2 2.0.11.1 requires bower-asset/jquery.inputmask ~3.2.2 | ~3.3.3 -> no matching package found.
      - yiisoft/yii2 2.0.11 requires bower-asset/jquery.inputmask ~3.2.2 | ~3.3.3 -> no matching package found.
      - yiisoft/yii2 2.0.10 requires bower-asset/jquery.inputmask ~3.2.2 -> no matching package found.
      - Installation request for yiisoft/yii2 >=2.0.6 -> satisfiable by yiisoft/yii2[2.0.10, 2.0.11, 2.0.11.1, 2.0.11.2, 2.0.12, 2.0.6, 2.0.7, 2.0.8, 2.0.9].
    

Potential causes:

Read https://getcomposer.org/doc/articles/troubleshooting.md for further common problems.


- 环境
1. fxp/composer-asset-plugin
```bash
name     : fxp/composer-asset-plugin
descrip. : NPM/Bower Dependency Manager for Composer
keywords : asset, bower, composer, dependency manager, nodejs, npm, package
versions : * v1.3.1
type     : composer-plugin
license  : MIT License (MIT) (OSI approved) https://spdx.org/licenses/MIT.html#licenseText
source   : [git] https://github.com/fxpio/composer-asset-plugin.git 0bfdd307d2cddbc42c634b14247f3f3a8525b836
dist     : [zip] https://api.github.com/repos/fxpio/composer-asset-plugin/zipball/0bfdd307d2cddbc42c634b14247f3f3a8525b836 0bfdd307d2cddbc42c634b14247f3f3a8525b836
names    : fxp/composer-asset-plugin

有遇到问题的同学吗,分享一下解决方法 yii官网直接下载可以跑,能不能直接覆盖到fecshop目录:smiley: :smiley: http://www.yiiframework.com/doc-2.0/guide-start-installation.html

共收到 12 条回复
asion#16年前 0 个赞

在composer.json中添加 "config": {

    "fxp-asset": {
        "repositories": {
            "bower-asset/jquery.inputmask": {
                "type": "bower-github",
                "url": "https://github.com/petrabarus/jquery.inputmask"
            }
        }
    }
}
V55V#26年前 0 个赞

你是用的root账号吗? 如果是,直接执行下试试,如果不是,将上面的root换成你的账号,在执行。

rm -rf /root/.composer  

然后重新按照安装步骤

http://www.fecshop.com/doc/fecshop-guide/develop/cn-1.0/guide-fecshop-about-hand-install.html

把你失败的文件夹删除,完全重新安装试试

Fecmall#36年前 1 个赞

这个是一个Yii2框架依赖包版本问题导致的,是最近几天的出现的,详情参看: https://github.com/yiisoft/yii2/issues/14275

解决步骤:

composer create-project fancyecommerce/fecshop-app-advanced fecshop 1.0.2.9 出现报错后,

cd fecshop 
vim composer.json

打开composer.json后

config部分配置修改为:

 "config": {
        "process-timeout": 1800,
        "fxp-asset": {
          "installer-paths": {
            "npm-asset-library": "vendor/npm",
            "bower-asset-library": "vendor/bower"
          },
          "repositories": [
            {
              "type": "bower-vcs",
              "url": "https://github.com/RobinHerbots/Inputmask.git",
              "name": "bower-asset/jquery.inputmask"
            }
          ]
        }

    },

修改完的composer.json的文件完整内容如下:

{
    "name": "yiisoft/yii2-app-advanced",
    "description": "Yii 2 Advanced Project Template",
    "keywords": ["yii2", "fecshop","cart", "shop", "e-commerce"],
    "homepage": "http://www.fecshop.com/",
    "type": "project",
    "license": "BSD-3-Clause",
    "support": {
        "forum": "http://www.fecshop.com/forum/",
        "wiki": "http://www.fecshop.com/wiki/",
        "source": "https://github.com/fancyecommerce/yii2_fecshop_app_advanced"
    },
    "minimum-stability": "stable",
    "require": {
        "php": ">=5.4.0",
        "yiisoft/yii2": ">=2.0.6",
        "yiisoft/yii2-bootstrap": "*",
        "yiisoft/yii2-swiftmailer": "*",
		"yiisoft/yii2-apidoc": "~2.0.0",
        "fancyecommerce/fecshop": ">=1.1.3.3"
    },
    "require-dev": {
        "yiisoft/yii2-codeception": "*",
        "yiisoft/yii2-debug": "*",
        "yiisoft/yii2-gii": "*",
        "yiisoft/yii2-faker": "*"
       
    },
    "config": {
        "process-timeout": 1800,
        "fxp-asset": {
          "installer-paths": {
            "npm-asset-library": "vendor/npm",
            "bower-asset-library": "vendor/bower"
          },
          "repositories": [
            {
              "type": "bower-vcs",
              "url": "https://github.com/RobinHerbots/Inputmask.git",
              "name": "bower-asset/jquery.inputmask"
            }
          ]
        }

    },
    "extra": {
        "asset-installer-paths": {
            "npm-asset-library": "vendor/npm",
            "bower-asset-library": "vendor/bower"
        }
    },
    "scripts": {
        "post-install-cmd": "php init --env=Development --overwrite=n"
    }
}

修改完成后,在fecshop文件夹下执行 composer update 即可通过安装

后面按照文档一步一步的执行:http://www.fecshop.com/doc/fecshop-guide/develop/cn-1.0/guide-fecshop-about-hand-install.html

我的安装log为:

[root@localhost fecshop]# composer update
Do not run Composer as root/super user! See https://getcomposer.org/root for details
The "extra.asset-installer-paths" option is deprecated, use the "config.fxp-asset.installer-paths" option
Loading composer repositories with packagUpdating dependencies (including require-dev)                                                            
Package operations: 48 installs, 0 updates, 0 removals     
  - Installing yiisoft/yii2-composer (2.0.5): Downloading (100%)         
  - Installing hightman/xunsearch (1.4.10): Downloading (100%)         
  - Installing tubalmartin/cssmin (v4.1.0): Downloading (100%)         
  - Installing pimple/pimple (v3.0.2): Downloading (100%)         
  - Installing psr/container (1.0.0): Downloading (100%)         
  - Installing container-interop/container-interop (1.2.0): Downloading (100%)         
  - Installing mrclay/props-dic (2.2.0): Downloading (100%)         
  - Installing mrclay/jsmin-php (2.3.2): Downloading (100%)         
  - Installing psr/log (1.0.2): Downloading (100%)         
  - Installing monolog/monolog (1.22.1): Downloading (100%)         
  - Installing intervention/httpauth (2.0.2): Downloading (100%)         
  - Installing mrclay/minify (3.0.1): Downloading (100%)         
  - Installing natxet/cssmin (v3.0.4): Downloading (100%)         
  - Installing tedivm/jshrink (v1.1.0): Downloading (100%)         
  - Installing bower-asset/jquery (2.2.4): Downloading (100%)         
  - Installing bower-asset/yii2-pjax (v2.0.6): Downloading (100%)         
  - Installing bower-asset/punycode (v1.3.2): Downloading (100%)         
  - Installing cebe/markdown (1.0.2): Downloading (100%)         
  - Installing ezyang/htmlpurifier (v4.9.3): Downloading (100%)         
  - Installing bower-asset/jquery.inputmask (3.3.7): Downloading (100%)         
  - Installing yiisoft/yii2 (2.0.12): Downloading (100%)         
  - Installing skeeks/yii2-assets-auto-compress (1.2.3): Downloading (100%)         
  - Installing yiisoft/yii2-mongodb (2.1.3): Downloading (100%)         
  - Installing phpoffice/phpexcel (1.8.1): Downloading (100%)         
  - Installing yiisoft/yii2-redis (2.0.6): Downloading (100%)         
  - Installing imagine/imagine (v0.5.0): Downloading (100%)         
  - Installing fancyecommerce/fec (1.1.3.2): Downloading (100%)         
  - Installing fancyecommerce/fec_admin (1.3.6.7): Downloading (100%)         
  - Installing fancyecommerce/fecshop (1.1.3.3): Downloading (100%)         
  - Installing swiftmailer/swiftmailer (v5.4.8): Downloading (100%)         
  - Installing yiisoft/yii2-swiftmailer (2.0.7): Downloading (100%)         
  - Installing scrivo/highlight.php (v8.9.1): Downloading (100%)         
  - Installing mikevanriel/text-to-latex (1.0.1): Downloading (100%)         
  - Installing cebe/markdown-latex (1.1.4): Downloading (100%)         
  - Installing cebe/js-search (0.9.3): Downloading (100%)         
  - Installing nikic/php-parser (v0.9.5): Downloading (100%)         
  - Installing phpdocumentor/reflection-docblock (2.0.5): Downloading (100%)         
  - Installing phpdocumentor/reflection (1.0.7): Downloading (100%)         
  - Installing bower-asset/bootstrap (v3.3.7): Downloading (100%)         
  - Installing yiisoft/yii2-bootstrap (2.0.6): Downloading (100%)         
  - Installing yiisoft/yii2-apidoc (2.0.6): Downloading (100%)         
  - Installing yiisoft/yii2-codeception (2.0.6): Downloading (100%)         
  - Installing yiisoft/yii2-debug (2.0.9): Downloading (100%)         
  - Installing bower-asset/typeahead.js (v0.11.1): Downloading (100%)         
  - Installing phpspec/php-diff (v1.1.0): Downloading (100%)         
  - Installing yiisoft/yii2-gii (2.0.5): Downloading (100%)         
  - Installing fzaninotto/faker (v1.6.0): Downloading (100%)         
  - Installing yiisoft/yii2-faker (2.0.3): Downloading (100%)         
monolog/monolog suggests installing aws/aws-sdk-php (Allow sending log messages to AWS services like DynamoDB)
monolog/monolog suggests installing doctrine/couchdb (Allow sending log messages to a CouchDB server)
monolog/monolog suggests installing graylog2/gelf-php (Allow sending log messages to a GrayLog2 server)
monolog/monolog suggests installing mongodb/mongodb (Allow sending log messages to a MongoDB server via PHP Driver)
monolog/monolog suggests installing php-amqplib/php-amqplib (Allow sending log messages to an AMQP server using php-amqplib)
monolog/monolog suggests installing php-console/php-console (Allow sending log messages to Google Chrome)
monolog/monolog suggests installing rollbar/rollbar (Allow sending log messages to Rollbar)
monolog/monolog suggests installing ruflin/elastica (Allow sending log messages to an Elastic Search server)
monolog/monolog suggests installing sentry/sentry (Allow sending log messages to a Sentry server)
mrclay/minify suggests installing firephp/firephp-core (Use FirePHP for Log messages)
mrclay/minify suggests installing leafo/lessphp (LESS support)
mrclay/minify suggests installing meenie/javascript-packer (Keep track of the Packer PHP port using Composer)
imagine/imagine suggests installing ext-imagick (to use the Imagick implementation)
imagine/imagine suggests installing ext-gmagick (to use the Gmagick implementation)
phpdocumentor/reflection-docblock suggests installing dflydev/markdown (~1.0)
phpdocumentor/reflection-docblock suggests installing erusev/parsedown (~1.0)
Package yiisoft/yii2-codeception is abandoned, you should avoid using it. Use codeception/codeception instead.
Writing lock file
Generating autoload files
[root@localhost fecshop]# 
asion#46年前 0 个赞

问题已解决,主要是jquery.inputmask 版本库变动,找不到地址。在composer.json里加就好了

asion#66年前 0 个赞

@Terry #5楼 我在一楼写了。和你说的是一样的

asion#76年前 0 个赞

@V55V #2楼 不是账号问题,解决了:smiley:谢谢

flighter#86年前 0 个赞

按照管理员同志的方法修改了composer.json后, 这个算不算成功? Package yiisoft/yii2-codeception is abandoned, you should avoid using it. Use codeception/codeception instead. 这句有问题么?

Fecmall#96年前 0 个赞

@flighter #8楼 成功了

10楼 已删除.
11楼 已删除.
12楼 已删除.
flighter#136年前 0 个赞

@Terry 好的

a40304#146年前 0 个赞

我在安装时遇到https://github.com/jquery/jquery-dist.git, could not load a package from it 阿里在美国的服务器,换了中国镜像也不行 应该是下载太多了,需要在composer.json里添加token才行,我从http://www.yiichina.com/question/2821 查到的,自己摸了半天,希望对后面的人有帮助

我记得开始下yii2的时候提示是很友好的,直接就问要token,这个问题不懂是不是我个人设置的问题

Fecmall#156年前 0 个赞

@a40304 [#14楼](#comment14)

1.您的操作步骤是不是这样?

1.1当composer下载失败后,进入fecshop文件夹,然后打开文件composer.json, 找到配置代码:

"config": {
        "process-timeout": 1800
    },

改成:

"config": {
        "process-timeout": 1800,
        "github-oauth": {
          "github.com": "此处输入您的github授权码"
          }
    },

1.2、获取github授权码

1) 点击 https://github.com/settings/tokens
2) 点击右上角 Generate new token
3) 在Token description中输入”可以任意”
4) 点击Generate token即可创建新的github授权码

将生成的授权码复制到 composer.json中的github.com对应的值中.

1.3、在fecshop文件夹内执行 composer update

2.按照上面的步骤执行后,上面的 jquery.inputmask包找不到 的错误,是不是就不报了? 可以直接安装成功了?

添加回复 (需要登录)
需要 登录 后方可回复, 如果你还没有账号请点击这里 注册
Your Site Analytics