pinfirestudios / craft3-bugsnag

Bugsnag integration extension for Craft CMS version 3
MIT License
4 stars 2 forks source link

Install issues with Composer #1

Closed mikestecker closed 6 years ago

mikestecker commented 6 years ago

When I have "minimum-stability": "beta" set in my composer.json, I get the following error:

  [InvalidArgumentException]
  Could not find package pinfirestudios/craft3-bugsnag at any version for your minimum-stability (beta). Check the package spelling or your minimum-stability

And if I try and change "minimum-stability": "beta" to "minimum-stability": "dev", which seems to work sometimes although it's not ideal, I get this error:

  Problem 1
    - pinfirestudios/yii2-bugsnag dev-master requires bower-asset/bugsnag ^3.0 -> no matching package found.
    - pinfirestudios/craft3-bugsnag dev-master requires pinfirestudios/yii2-bugsnag dev-master -> satisfiable by pinfirestudios/yii2-bugsnag[dev-master].
    - Installation request for pinfirestudios/craft3-bugsnag dev-master -> satisfiable by pinfirestudios/craft3-bugsnag[dev-master].

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.

Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
jcherniak commented 6 years ago

Hi Mike, I just pushed a 1.0.0 stable tag for yii2-bugsnag and a 1.0.0-beta1 tag for this. Let me know if those work for you.

jcherniak commented 6 years ago

Oh...wait, the issue with bower-asset comes from using the "standard Yii2 way" of using this plugin. You need "fxp/composer-asset-plugin" installed globally to make that work. I know there are better ways to do this now, but there weren't when I wrote yii2-bugsnag over a year ago.

See the first line here: http://www.yiiframework.com/doc-2.0/guide-start-installation.html#installing-from-composer

mikestecker commented 6 years ago

Thanks for the quick reply! I'll wait until you get #2 done so I don't have to worry about installing stuff globally for it to work.

jcherniak commented 6 years ago

@mikestecker - this should be fixed now. Was a simple fix. Let me know if it works for you now out of the box.

mikestecker commented 6 years ago

Still not working sorry...

  Problem 1
    - pinfirestudios/craft3-bugsnag 1.0.0-beta.2 requires pinfirestudios/yii2-bugsnag ^1.0.1 -> satisfiable by pinfirestudios/yii2-bugsnag[1.0.1].
    - pinfirestudios/craft3-bugsnag 1.0.0-beta.1 requires pinfirestudios/yii2-bugsnag ^1.0.0 -> satisfiable by pinfirestudios/yii2-bugsnag[1.0.0, 1.0.1].
    - pinfirestudios/yii2-bugsnag 1.0.1 requires bower-asset/bugsnag ^3.0 -> no matching package found.
    - pinfirestudios/yii2-bugsnag 1.0.0 requires bower-asset/bugsnag ^3.0 -> no matching package found.
    - Installation request for pinfirestudios/craft3-bugsnag ^1.0@beta -> satisfiable by pinfirestudios/craft3-bugsnag[1.0.0-beta.1, 1.0.0-beta.2].

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.

Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.
jcherniak commented 6 years ago

Hmm, perhaps you need asset-packagist in your project's composer.json. Can you try adding this to your project's composer.json and see if it works?

"repositories": [
    {
        "type": "composer",
        "url": "https://asset-packagist.org"
    }
]
mikestecker commented 6 years ago

That did it!

jcherniak commented 6 years ago

Great. Let me push a change that disables the JS portion completely since it's not actually implemented in this plugin yet, but at least we tracked down the issue.

jcherniak commented 6 years ago

OK, so try it now, I made the JS portion suggested, but not required and added instructions on how to install it, if desired.

mikestecker commented 6 years ago

Perfect. I was able to remove the plugin, clear my composer cache, remove the repository portion from composer.json and reinstall without issues. I can see when I install now the recommendation to enable Bugsnag JS logging as well...

Thanks for fixing!

jcherniak commented 6 years ago

Glad we got it figured out. Enjoy!