cancel
Showing results for 
Search instead for 
Did you mean: 

problems with creating a module in magento 2 (missing app/code dir)

problems with creating a module in magento 2 (missing app/code dir)

Hi

 

I know that when you create a module you should put it the app/code/<Vendor>/<Module>/ but for some reason i don't have one. I verified the installation of magento 2 and it works as it is suppose to. I tried to make a simple module in vendor but that doesn't work.

I installed magento via composer with the magento CE matapachage.

if anyone can help me i would appreciate it

 

4 REPLIES

Re: problems with creating a module in magento 2 (missing app/code dir)

You should not put a Magento 2 extension code anywhere: Magento 2 extensions are installed through Composer and Composer will download the extension from a repositoty and will place it in a proper location.

For example:

How to install an extension from a Git repository: https://mage2.pro/t/25

Re: problems with creating a module in magento 2 (missing app/code dir)

thanks,
just one more question does making an extension with composer make the
app/code directory since that is missing. I ask because every tutorial i
read says that it must be there.

Re: problems with creating a module in magento 2 (missing app/code dir)

You need not app/code directory. The tutorials are outdated.

Re: problems with creating a module in magento 2 (missing app/code dir)

Thanks for your answer

I solved the problem in the end by makiing mine own app/code directory and it works for me