# Composer Module installation during development without repository (Oxid 6.2)

**URL:** <https://forum.oxid-esales.com/t/composer-module-installation-during-development-without-repository-oxid-6-2/97069>\
**Category:** English forums\
**Tags:** development\
**Created:** [September 3, 2020, 12:02pm UTC](https://forum.oxid-esales.com/t/composer-module-installation-during-development-without-repository-oxid-6-2/97069 "2020-09-03T12:02:44Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dev\_ht](https://forum.oxid-esales.com/user_avatar/forum.oxid-esales.com/dev_ht/32/2136_2.png) [@dev\_ht](https://forum.oxid-esales.com/u/dev_ht)\
**Post date:** [September 3, 2020, 12:02pm UTC](https://forum.oxid-esales.com/t/composer-module-installation-during-development-without-repository-oxid-6-2/97069/1 "2020-09-03T12:02:44Z")

</div>

For the installation of a module during development in Oxid 6.2 I followed the best practices described here: [https://docs.oxid-esales.com/developer/en/6.2/development/modules\_components\_themes/module/tutorials/module\_setup.html](https://docs.oxid-esales.com/developer/en/6.2/development/modules_components_themes/module/tutorials/module_setup.html)

As the module is in development, using a repository is not a viable solution for every single change.

Thus, I manually copied the module to the Oxid modules’ folder: `<shop_directory>/source/modules/<my-vendor>/<my-module>`

Then from the Console, being inside the `<shop_directory>`, I ran the followings:

```auto
# <my-module-path> = /source/modules/<my-vendor>/<my-module>
# <my-package-name> = the name value from /source/modules/<my-vendor>/<my-module>/composer.json
vendor/bin/oe-console oe:module:install-configuration <my-module-path>
# Output: Module configuration has been installed.
composer config repositories.<my-package-name> path <my-module-path>
# <shop_directory>/composer.json gets updated as expected with the new repository
composer require <my-package-name>:*
# Output:
/*
./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 <my-package-name> could not be found in any version, there may be a typo in the package name.

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.
 - 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 common problems.

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

```

I went through the list of potential causes, however none of them seems to be the case.

As a workaround I had to manually add the Composer namespaces for autoloading inside the `<shop_directory>/composer.json` file:

```auto
    "autoload": {
        "psr-4": {
            "MyVendor\\CustomModule1\\": "./source/modules/myvendor/custommodule1",
            "MyVendor\\CustomModule2\\": "./source/modules/myvendor/custommodule2"
        }
    }

```

Isn’t it possible to avoid this workaround for a Module installation during development without having an actual repository?

---

<div class="post-metadata">

**Author:** ![vanilla\_thunder](https://forum.oxid-esales.com/user_avatar/forum.oxid-esales.com/vanilla_thunder/32/72_2.png) [@vanilla\_thunder](https://forum.oxid-esales.com/u/vanilla_thunder)\
**Post date:** [September 3, 2020, 12:25pm UTC](https://forum.oxid-esales.com/t/composer-module-installation-during-development-without-repository-oxid-6-2/97069/2 "2020-09-03T12:25:39Z")

</div>

We are talking about composer repositories and not about versioning repositories, right?

The whole concept of package/dependency management is built on top of repositories.  
Basically: you cant install a package if there is no source (repository) for this package.

Also composer repository is not required to be a git repository, they both work independently and you can use any directory in your filesystem as repository for composer.

According your particular case:  
you used the absolute path instead of relative path for your repository:  
wrong: `/source/modules/<my-vendor>/<my-module>`  
correct: `source/modules/<my-vendor>/<my-module>`

---

<div class="post-metadata">

**Author:** ![dev\_ht](https://forum.oxid-esales.com/user_avatar/forum.oxid-esales.com/dev_ht/32/2136_2.png) [@dev\_ht](https://forum.oxid-esales.com/u/dev_ht)\
**Post date:** [September 3, 2020, 1:49pm UTC](https://forum.oxid-esales.com/t/composer-module-installation-during-development-without-repository-oxid-6-2/97069/3 "2020-09-03T13:49:09Z")

</div>

Thanks for your reply!

I was referring to not having an actual git/versioning repository.  
That’s the same as I thought that any directory can be a repository for Composer.

The absolute path in my initial post was just a typo in the post, on my actual machine I tried with both the correct relative path, and full absolute path.

Unfortunately I get the same error message and I can’t understand what’s causing it.

---

<div class="post-metadata">

**Author:** ![system](https://forum.oxid-esales.com/user_avatar/forum.oxid-esales.com/system/32/4245_2.png) [@system](https://forum.oxid-esales.com/u/system)\
**Post date:** [September 3, 2021, 1:49pm UTC](https://forum.oxid-esales.com/t/composer-module-installation-during-development-without-repository-oxid-6-2/97069/4 "2021-09-03T13:49:10Z")

</div>

Closed on September 3, 2021, 1:49pm UTC

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
