Problem

When trying to execute the following Composer command


composer config repositories.VENDOR /path/to/some/package/


this error appears:


... failed to open dir: No such file or directory


Cause

Composer cannot find the package (ZIP or TGZ).


Either the given folder does not contain the package, or the path is not correct.


Solution

Omit package name

The path must point to the folder that contains the package, not to the package itself.


Example: If the package is located here


/path/to/some/package/vendor-module.zip


then you must leave out the part "vendor-module.zip" in the Composer command.


Absolute path

If the path starts with a slash '/' then you must enter the full absolute path, starting from the server (Linux) root.