Mind Optimizer
Mind Optimizer

Reputation: 195

Drupal 9 - Unable to install package with composer

How can I add a new package to the vendor folder by using the composer. I tried to use the composer command composer require [package-name]. However, I tried but I was getting an error telling me "./compose.json" is not a UTF-8. After several attempts to configure some PHP options and execute the same command, the package was downloaded, but in a different path than the drupal-9.x.x/vendor/package-name-folder path. But there is another path inside the drupal-9.x.x/core folder. The package name is included in the composer.json file in the drupal-9.x.x/core folder path.

The question here is how can I insert a new package using the composer command into the Drupal project, and is it possible to link this package to a custom module so that it is from the installation dependencies?

Upvotes: 0

Views: 383

Answers (1)

Mind Optimizer
Mind Optimizer

Reputation: 195

I found the problem seems to be related to eclipse ide and trying to open the composer .json file through the ide and using the ide options to download and install the package

What I did was use the git bash and I executed the composer command and the package was downloaded as required

Upvotes: 0

Related Questions