Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Exception with composer and npm-asset #16242

Closed
fcaldarelli opened this issue May 7, 2018 · 3 comments
Closed

Exception with composer and npm-asset #16242

fcaldarelli opened this issue May 7, 2018 · 3 comments

Comments

@fcaldarelli
Copy link
Member

What steps will reproduce the problem?

Add npm-asset/moment or npm-asset/ssr-window to composer.json

What is the expected result?

Moment and/or ssr-window installed in vendor/npm-asset folder.

What do you get instead?

[InvalidArgumentException]
Unknown downloader type: npm-signature. Available types: git, svn, fossil, hg, perforce, zip, rar, tar, gzip, xz, phar, file, path.

Additional info

This is my composer.json file:

{
    "name": "yiisoft/yii2-app-advanced",
    "description": "Yii 2 Advanced Project Template",
    "keywords": ["yii2", "framework", "advanced", "project template"],
    "homepage": "http://www.yiiframework.com/",
    "type": "project",
    "license": "BSD-3-Clause",
    "support": {
        "issues": "https://github.com/yiisoft/yii2/issues?state=open",
        "forum": "http://www.yiiframework.com/forum/",
        "wiki": "http://www.yiiframework.com/wiki/",
        "irc": "irc://irc.freenode.net/yii",
        "source": "https://github.com/yiisoft/yii2"
    },
    "minimum-stability": "stable",
    "require": {
        "php": ">=5.4.0",
        "yiisoft/yii2": "~2.0.6",
        "yiisoft/yii2-bootstrap": "~2.0.0",
        "yiisoft/yii2-swiftmailer": "~2.0.0",
        "dmstr/yii2-adminlte-asset": "2.*",
        "kartik-v/yii2-widget-datepicker": "@dev",
        "kartik-v/yii2-widget-datetimepicker": "*",
        "fabriziocaldarelli/yii2-file-uploader": "*",
        "kartik-v/yii2-widget-timepicker": "*",
        "npm-asset/swiper": "^4.2",
        "bower-asset/semantic-ui": "^2.3",
        "npm-asset/moment": "^2.22"
    },
    "require-dev": {
        "yiisoft/yii2-debug": "~2.0.0",
        "yiisoft/yii2-gii": "~2.0.0",
        "yiisoft/yii2-faker": "~2.0.0",

        "codeception/base": "^2.2.3",
        "codeception/verify": "~0.3.1"
    },
    "config": {
        "process-timeout": 1800,
        "fxp-asset":{
            "installer-paths": {
                "npm-asset-library": "vendor/npm",
                "bower-asset-library": "vendor/bower"
            }
        }
    }
}

When it is possible, I'm using bower, but sometime packages are required by other library (for example, ssr-window is required by swiper), so I can't change it.

I've tryed to delete npm-asset folder and all vendor folder, but it does not work.

Maybe I should handle npm package instead npm-asset, how suggested here: https://github.com/tanakahisateru/yii2-app-basic-npm

Q A
Yii version 2.0.15.1
PHP version 7.1.16
Operating system Linux
@rob006
Copy link
Contributor

rob006 commented May 7, 2018

This is fxp/composer-asset-plugin bug. See fxpio/composer-asset-plugin#321

@rob006 rob006 closed this as completed May 7, 2018
@fcaldarelli
Copy link
Member Author

fcaldarelli commented May 7, 2018

OK, but how could it be solved?

I think that it is very common issue because famous packages are affected.

Could it be the right time to pass to npm ?

@winternet-studio
Copy link
Contributor

OK, but how could it be solved?

I updated my fxp/composer-asset-plugin (from 1.4.2 to 1.4.6) - it solved it.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants