0

I'm trying to install a couple of modules through composer on Magento 2.4 using the default composer.json, however it fails. I'm using composer version 1.10.21. According to the official documentation I should use the following line:

composer require myparcelnl/magento

Output:

Using version ^4.1 for myparcelnl/magento
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - The requested package magento/product-community-edition could not be found                                                                              in any version, there may be a typo in the package name.
  Problem 2
    - myparcelnl/magento 4.1.4 requires magento/product-community-edition ~2.3.0                                                                              || ~2.4.0 -> no matching package found.
    - myparcelnl/magento 4.1.3 requires magento/product-community-edition ~2.3.0                                                                              || ~2.4.0 -> no matching package found.
    - myparcelnl/magento 4.1.2 requires magento/product-community-edition ~2.3.0                                                                              || ~2.4.0 -> no matching package found.
    - myparcelnl/magento 4.1.1 requires magento/product-community-edition ~2.3.0                                                                              -> no matching package found.
    - myparcelnl/magento 4.1.0 requires magento/product-community-edition ~2.3.0                                                                              -> no matching package found.
    - Installation request for myparcelnl/magento ^4.1 -> satisfiable by myparce                                                                             lnl/magento[4.1.0, 4.1.1, 4.1.2, 4.1.3, 4.1.4].

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your min                                                                             imum-stability setting
   see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more det                                                                             ails.
 - 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 commo                                                                             n problems.

Installation failed, reverting ./composer.json to its original content.

I've made sure the credentials are correct and placed in auth.json. Currently I'm really stuck, any help would be appreciated.

Also tried to do a manual install, plugin appears in the backend but when open it, it shows an error:

2 exception(s):
Exception #0 (Magento\Framework\Exception\LocalizedException): Invalid block type: \MyParcelNL\Magento\Block\System\Config\Form\SupportTab
Exception #1 (ReflectionException): Class MyParcelNL\Magento\Block\System\Config\Form\SupportTab does not exist
2
  • myparcelnl/magento module is not compatible for M2.4.x
    – Sohel Rana
    Apr 4, 2021 at 12:41
  • According to the offical documentation it's compatible for Community 2.x. Since I'm running 2.4 it should work right. Also tried SendCloud which is capable of running on Magento 2.4.x which gives the same result.
    – Aart
    Apr 4, 2021 at 13:03

1 Answer 1

0

myparcelnl/magento module is compatible with 2.4.x. I think issue in your composer.josn file. You need to update composer.json file, edit composer.josn file from your Magento's root path

Step-1: Change version

"version": "2.x.x" with "version": "2.4.2",

Step-2: Update version under require,

"magento/product-community-edition": "2.x.x" to "magento/product-community-edition": "2.4.2",

Step-3: Run command following command from command prompt,

composer update

Step-4: Run following commands to see changes of version 2.4.2

php bin/magento setup:upgrade && php bin/magento setup:static-content:deploy -f && bin/magento setup:di:compile && php bin/magento cache:flush

Step-5: Install module using following command

composer require myparcelnl/magento

NOTE: Please perform these steps in your development environment to avoid unseen errors

4
  • Thank you for your reply! I've changed the composer.json file and changed the version under required to 2.4.2. As I read it, step 1 and 2 are the same right? Still the same outcome. What am I missing?
    – Aart
    Apr 6, 2021 at 7:15
  • Step 1 and Step 2 both are different, please refer this link
    – Pratik Oza
    Apr 7, 2021 at 18:56
  • Thank you for your reply. Currently the issue remains.
    – Aart
    Jun 16, 2021 at 14:04
  • I've removed json.lock, vendor folder and ran composer update. However when I add the following through compose and change it like you suggested, It's not working. composer require magento/product-community-edition --no-update magento/magento2ce is present at version 2.4.2 and cannot be modified by Composer magento/product-community-edition 2.4.2 requires magento/magento2-base 2.4.2 magento/magento2-base[2.4.2] cannot be installed as that would require removing magento/magento2ce[2.4.2]. They both replace trentrichardson/jquery-timepicker-addon and thus cannot coexist.
    – Aart
    Jun 16, 2021 at 14:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.