Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Problems installing NPM-assets #321

Closed
jeabakker opened this issue Apr 17, 2018 · 16 comments · Fixed by #324
Closed

Problems installing NPM-assets #321

jeabakker opened this issue Apr 17, 2018 · 16 comments · Fixed by #324

Comments

@jeabakker
Copy link

since a few days i get errors when trying to update/install npm-asset dependencies

It's trying to update to npm-asset/moment v2.22.1

  - Removing npm-asset/moment (2.22.0)

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

I don't know if this is the correct place to report this, if not i'm sorry.

composer --version
Composer version 1.6.4 2018-04-13 12:04:24

and

fxp/composer-asset-plugin v1.4.2 NPM/Bower Dependency Manager for Composer
@holtkamp
Copy link

holtkamp commented Apr 17, 2018

Also got some issues since a few days / since composer 1.6.4: it seems a specific package is removed without any sign. After a composer update no "removals" were reported but the composer.lock file is changed and a package is removed. Reported this in a separate issue, not sure it is related to this issue: #322

@Zaporozhec7
Copy link
Contributor

I have same issue, with same package "npm-asset/moment" of version 2.21.0

@hypeJunction
Copy link
Contributor

hypeJunction commented Apr 19, 2018

Having this issue as well now with npm-asset/formdata-polyfill
For some reason it's trying to remove it first, then I get the exception

@rob006
Copy link

rob006 commented Apr 20, 2018

The reason: https://blog.npmjs.org/post/172999548390/new-pgp-machinery

I described workaround at Stack Overflow, but it will be a pain if you have multiple npm packages broken by this.

@SilverFire @hiqsol This affects also asset-packagist - just check dist URL of last release of https://asset-packagist.org/package/npm-asset/moment

Zaporozhec7 pushed a commit to Zaporozhec7/composer-asset-plugin that referenced this issue Apr 21, 2018
Zaporozhec7 added a commit to Zaporozhec7/composer-asset-plugin that referenced this issue Apr 21, 2018
@Zaporozhec7
Copy link
Contributor

Zaporozhec7 commented Apr 21, 2018

I have created pull request with fix for this issue, but it fail test, since my fix disallow other dist types than supported by Composer, but in test data used dist type "type" (https://github.com/fxpio/composer-asset-plugin/blob/master/Tests/Converter/NpmPackageConverterTest.php#L192).

I think filter out all unknown by Composer types is right solution, since this can help to avoid new issues like this if next time npm will add another one new field to dist information

@twisted1919
Copy link

Any updates on this ? This simply left our apps broken...

@sicutdeux
Copy link

Bump here with npm-asset/load-google-maps-api (1.2.1)

@sicutdeux
Copy link

editing the composer.json file and removing the dependency in the require section, then using "composer require" it does work, but that's not a solution really.

@SDKiller
Copy link

@sicutdeux

Another workaround - it worked for me (compared with @rob006 described - you need not locate release tarball):

    "config": {
        ...
        "fxp-asset": {
             ...
            "repositories": [
                {
                    "name": "npm-asset/html5sortable",
                    "type": "npm-vcs",
                    "url": "[email protected]:lukasoppermann/html5sortable.git"
                }

Note that you add package to repositories in fxp-asset entry in config, not to repositories in composer.json root.

@jeabakker
Copy link
Author

Still no permanent solution (after 1 month)?? @francoispluchino

@nimer-
Copy link

nimer- commented May 22, 2018

Yeah - it is surprising. A lot of workarounds, 1 PR that solves it, but we have no real permanent solution. That's a bummer to say the least.

@francoispluchino
Copy link
Member

@jeabakker @nimer- The PR #323 still has errors in the tests, that's why it is not merged. But you can contribute by proposing a valid PR. A help is always appreciated.

@twisted1919
Copy link

twisted1919 commented May 22, 2018

@francoispluchino

he PR #323 still has errors in the tests, that's why it is not merged. But you can contribute by proposing a valid PR. A help is always appreciated.

This sounds easy in theory, right? But think a bit, we are developers doing other things and we have no experience to work on your plugin, getting involved would mean maybe hours to only learn it's internals.

If you have problem finding the time, please don't throw it on your user base, instead, set a donation page, let us pay for your time and fix the issue if possible. This is how things work, i would gladly contribute to see this issue solved.

Just my two cents.

@francoispluchino
Copy link
Member

@twisted1919 I don't blame the users of my plugin, I just remind that it is not necessary to complain that it doesn't progress and that it is always possible to contribute to go faster. There is a nuance. I understand that it's frustrating because it happens to me when I use OSS components. Personally, when there is a bug, even if I'm only a simple user, I take the time to learn the logic to try to propose a PR fixing the bug if this problem blocks my project, or I wait without complaint if I cannot do it. Apart from this little detail, I already indicated in this comment (in connection with this one) that this plugin would not evolve anymore, and that it would be maintained by the contributions of the community. However, it is true that it is not indicated on the Readme of the repository (but now added with b8f9983).

Also, thank you for your proposal to create a donation page, but this library is not large enough for that. Moreover, a lot of problem cannot be solved for NPM, owing to the difference between Composer and NPM (Bower has more similarity with Composer) and the obligation to use Nodejs more and more for the proper functioning of the assets, with for example, the use of Webpack, Babel, Typescript, Scss, etc... As a result, I worked on a 2.0 version of this plugin, but there is so much difference that it is another project. For more information, you can read the FAQ of Foxy, the next major version of Composer Asset Plugin, to understand the reasons for this change (this comment for more details), and what is the difference between Foxy and Fxp Composer Asset Plugin.

All this to say that I like to share my work, and that I very much appreciate when it be used. I always try to find some free time to maintain my different repositories, even if I do not use them anymore (which is very difficult lately). Regarding this plugin, the future of this tool is in Foxy, but I continue to maintain CAP by merging the PRs of the contributors, because this plugin is still used by some Frameworks either directly or through the Asset-Packagist, but this plugin will no longer receive new features.

Thank you everybody for your understanding.

@hypeJunction has just proposed the PR #324 fixing the exception Unknown downloader type: npm-signature. Does it also fix this issue?

@twisted1919
Copy link

@francoispluchino - thank you for the explanation, i had no idea about all this, i came here because i am a Yii 2 user and that relies heavily on this plugin. Thank you for all the work you have done so far, i personally appreciate it a lot, especially now that i have more insights.

@jeabakker
Copy link
Author

v1.4.3 works for me, no more exceptions ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

10 participants