No matter what I add as version, I always get alpha1 with composer and the Module-Folder is named "viewsreferennce".
Maybe there is a conflict with an old repository? https://packagist.drupal-composer.org/search/?q=viewsre
On https://packagist.drupal-composer.org/packages/drupal/viewsreferennce it does say in the bottom right: "Replaces: drupal/viewsreference: 8.1.0-alpha1". Maybe there lies the reason of the issues we're experiencing?
Comments
Comment #2
ayrmax commentedComment #3
NewZeal commentedViews reference has its own packagist entry: https://packagist.drupal-composer.org/packages/drupal/viewsreference . All the entries in the composer.json reference viewsreference, so I cannot see why composer should reference the wrong entry. Is there something we can add to composer.json to force the right entry?
Comment #4
gngn commentedSame (similiar?) problem here.
My "require"-entry in composer.json is:
"drupal/viewsreference": "~1.0".Trying
composer update --dry-runI get two(!) entries:So it's one wrongly named viewsreferennce and one correct viewsreference . Both say 1.0.0-alpha1 - current version is 1.0-alpha7.
Because I really needed the module I just downloaded alpha7 without composer...
Maybe someone can delete the viewsreferennce entry
https://packagist.drupal-composer.org/packages/drupal/viewsreferennce ?
Comment #5
Patrick Bauer commented@new-zeal
We're using the official D8 repository (https://packages.drupal.org/8) and not the deprecated drupal-composer.org one.
In the official package repo, theres only one version specified (alpha-1):
I don't know how the repo is managed, but you may have to update your package there.
Comment #6
gngn commentedcomposer showalso finds viewsreferennce (also alpha1):Comment #7
NewZeal commentedThis bug was caused by a previous (embarrasing!) mis-spelling of this module when creating a repository. I have renamed the info file for that module to viewsreferennce.info.yml and so now this problem does not occur when using composer. FYI I got the url https://www.drupal.org/project/viewsreferennce directed to this page so you cannot visit the previous (embarrassing) module page.
Please confirm and I'll mark this fixed.
Comment #8
gngn commentedRunning
composer update --dry-runI'm still gettingcomposer show -a drupal/viewsreferenncereturns two versions:versions : 1.0.0-alpha2, 1.0.0-alpha1composer show -a drupal/viewsreferencereturns one version:versions : 1.0.0-alpha1Maybe I'm doing something wrong...?
Comment #9
NewZeal commentedAre you running
composer require drupal/viewsreferencefrom your Drupal root?
Comment #10
NewZeal commentedYour problem may be occurring because of an entry in composer.lock (in your Drupal root). Either delete that entry or the whole composer.lock file and run composer on viewsreference again.
Comment #11
gngn commentedcomposer update --dry-runfrom my drupal root.--dry-runbecause I fist want to check what will happen.composer update --dry-runstill showed "drupal/viewsreferennce (1.0.0-alpha1)" and ""drupal/viewsreference (1.0.0-alpha1)"Comment #12
dom18fr commentedI required drupal/viewsreference for the first time yesterday (no composer.lock), and got the the misspelled viewsreferennce alpha1 too.
Comment #13
tijsdeboeckSame issue here, tried to require viewsreference (dev version) and got the same error.
My command was
composer require drupal/viewsreference:1.x-devI'm also using the official D8 repository (https://packages.drupal.org/8), and running the command from Drupal root
Comment #14
NewZeal commentedCurrently the viewsreferennce module has no composer.json file and it appears that when you run composer require drupal/viewsreference it looks for a viewsreference.info.yml file in the first instance, maybe because it was created first.
It appears that the name entry of "drupal/viewsreference" in viewsregerence/composer.json has no bearing. Why Drupal composer looks for the info file (or somesuch) rather than the actual project name I cannot explain, but the options available to overcome a problem such as this appear limited.
I am not able to change the contents of viewsreferennce alpha1, because it is Drupal policy not to allow tags to be deleted or changed. It appears that the viewsreference.info.yml file in viewsreferennce gets picked first and there is nothing we can do about it.
I have submitted a request to fix this problem with the composer people at Drupal: https://www.drupal.org/node/2838522
Until that is fixed, you can install using composer by running:
composer require drupal/viewsreference-viewsreferenceComment #15
NewZeal commentedIssue fixed: https://www.drupal.org/node/2838522