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

Composer install fails: required package matomo-org/jshrink does not exist #14874

Closed
creativecoder opened this issue Sep 9, 2019 · 6 comments
Labels
answered For when a question was asked and we referred to forum or answered it.
Milestone

Comments

@creativecoder
Copy link

I maintain a composer managed install of Matomo. For several releases now I've been unable to update Matomo because it's composer.json file requires a package that does not exist in packagist: matomo-org/jshrink.

When running composer require piwik/piwik:3.11.0, I get this output

Problem 1
    - Installation request for piwik/piwik 3.11.0 -> satisfiable by piwik/piwik[3.11.0].
    - piwik/piwik 3.11.0 requires matomo-org/jshrink 1.3.1 -> no matching package found.

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability setting
   see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
 - It's a private package and you forgot to add a custom repository to find it

Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
@Findus23
Copy link
Member

Findus23 commented Sep 9, 2019

Hi,

The package is defined in the package.json:

matomo/composer.json

Lines 89 to 116 in 9855f8c

"type": "package",
"package": {
"name": "matomo-org/jshrink",
"description": "Javascript Minifier built in PHP",
"keywords": ["minifier","javascript"],
"homepage": "http://github.com/tedious/JShrink",
"type": "library",
"license": "BSD-3-Clause",
"version": "1.3.1",
"authors": [
{
"name": "Robert Hafner",
"email": "tedivm@tedivm.com"
}
],
"require": {
"php": "*"
},
"autoload": {
"psr-0": {"JShrink": "src/"}
},
"source": {
"type": "git",
"url": "https://github.com/tedious/JShrink",
"reference": "v1.3.1"
}
}
}

This hack is required as the original package doesn't support 5.5 anymore, but Matomo needs the support.

As a workaround until Matomo 4 it should work if you add the repositories entry to your composer.json.

@creativecoder
Copy link
Author

Thanks! -- I should have seen that in the composer configuration.

I was able to work around the error by copying the same repository config into my project.

@Findus23 Findus23 added the answered For when a question was asked and we referred to forum or answered it. label Sep 9, 2019
@mattab mattab added this to the 3.12.0 milestone Oct 27, 2019
@bluikko
Copy link

bluikko commented Jul 1, 2021

This issue seems to still be present in Matomo 4.x? #14874 (comment) says it should be fixed?

@sgiehl
Copy link
Member

sgiehl commented Jul 1, 2021

@bluikko we meanwhile directly require tedvim/jshrink again, so any requirement of matomo-org/jshrink should be removed.
If you have any similar issues, please create a new issue with a detailed description about the error and how to reproduce

@bluikko
Copy link

bluikko commented Jul 1, 2021

we meanwhile directly require tedvim/jshrink again

I see - yes, it was about "tedivm" and not "matomo-org". The details are not clear to me right now but seems vendor/tedivm/jshrink was needed to be deleted as part of the install. It is an ExtraTools install so uses composer. Might create a new issue if I get the details, it is clearly not related to this issue.

@sgiehl
Copy link
Member

sgiehl commented Jul 1, 2021

If it is ExtraTools related, please create an issue in the plugin repo https://github.com/digitalist-se/extratools

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered For when a question was asked and we referred to forum or answered it.
Projects
None yet
Development

No branches or pull requests

5 participants