Composer require drupal/ packages doesn't work
문제
If I run...
composer require drupal/token
...I get...
Could not find a version of package drupal/token matching your minimum-stab
ility (dev). Require it with an explicit version constraint allowing its de
sired stability.
Not sure if this is relevant, but token is already installed in my site, but is not required in composer. I want to require (and upgrade) the module with composer.
Changing my minimum stability from dev to stable does not resolve the problem.
I am having the same problem with other modules when I try to run 'composer require'. Composer always responds with "Could not find a matching version of package..."
Here is a question I posted earlier today that may be related: Composer doesn't see that updates are needed
해결책
Sounds like Composer doesn't know about Drupal's packages, which suggests you're missing a reference to the repository in composer.json.
Add this and you should be good to go:
"repositories": [
{
"type": "composer",
"url": "https://packages.drupal.org/8"
}
]
제휴하지 않습니다 drupal.stackexchange