Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've installed Magento 2 on local server successfully using composer but I'm not able to see frontend and admin panel designs. I see plain texts there. While looking at console I see following error.

TypeError: require.config is not a function requirejs-config.js
TypeError: require.config is not a function admin:59
TypeError: require is not a function admin:62
ReferenceError: Ext is not defined admin:68
ReferenceError: Fieldset is not defined admin:76
TypeError: require is not a function admin:83
TypeError: require is not a function

enter image description here

share|improve this question
    
apache / nginx ? – zhartaunik Apr 27 '15 at 7:45
    
I'm using apache server. – amitshree Apr 27 '15 at 8:49
    
are you on windows? – Chris O'Toole Apr 29 '15 at 16:25
    
Nope. I'm using ubuntu. – amitshree May 3 '15 at 4:40
up vote 4 down vote accepted

This could be an issue with symlinks. I see that deploy.php worked for you, but you may also try deleting the resources from pub/static and seeing if the instructions from http://magento.stackexchange.com/a/64808/594 work for you. If so, then it may save you some time during development as it should be faster than running deploy.php.

It would also be good to know if multiple people are hitting issues with the symlinks and what the common cause is.

share|improve this answer
    
Anybody came across this issue should try this at first. Thank you ! – Haijerome Sep 11 '15 at 14:25
    
Basically we have had this specific problem with Magento-Installations below 2.0.6, if anybody has problems. Especially 2.0.4 bugged us. So, if you still need one of those versions, use this. Next upgrade should be to the latest stable version! – Max Sep 20 at 22:01

If you facing problem of css and design after installation in window please follow the following step

step 1. php bin/magento setup:static-content:deploy

step 2. php bin/magento indexer:reindex

step 3. make sure apache "rewrite_module" is enable and then restart the server

step 4. delete cache folder under var/cache

The above step working for me.I hope this will work for you also.

Let me know if you still facing any problem.

share|improve this answer
    
This worked for me thanks Sagar. – vithyalega Feb 1 at 11:31

After navigating to the folder dev/tools/Magento/Tools/View and running this in the command line solved the issue.

php deploy.php
share|improve this answer
1  
damn hoped that'll fix my Problem, too but dev/tools/Magento/Tools/View does not exists in my installation – Tobias Hartmann Oct 21 '15 at 9:52
    
@TobiasHartmann: Have you checked mod_rewrite is enabled or not? Also all directories/files are having correct permission or not? – amitshree Oct 26 '15 at 10:54

I ran into this issue on several Magento 2 installations in production.

Assuming you did this first from the command line.

php bin/magento setup:static-content:deploy from <magento_install_dir>

Then change file permissions to 755 on the following directories:

/pub/

/pub/static/

/pub/static/frontend/

/pub/static/adminhtml/

/pub/static/_requirejs/

Voila! CSS/JS files load perfectly.

share|improve this answer

If you are facing problem of css and js page load design after installation in magento2 please follow the following step-:

open the terminal and navigate to magento web root

 $ cd /var/www/html/magento2 
Step 1.

 $ php bin/magento setup:static-content:deploy 

Step 2.

 $ php bin/magento indexer:reindex
Step 3.

make sure apache “rewrite_module” is enable and then restart the server

Step 4.

 $ chown -R www-data:www-data /var/www/html/magento2 
Step 5.

 $ chmod -R 777 /var/www/html/magento2 
Step 6.

delete cache folder under var/cache

The above step working. I hope this will work for you also.

share|improve this answer

Please follow the steps below to get rid of this issues.

1) Download the Magento 2.

2) Extract this in your www OR htdocs directory.

3) Install the magento. Do not use localhost, use 127.0.0.1 in store url and admin url.

4) After successful installation DO NOT RUN MAGENTO.

5) Now delete the cache / session of magento 2. Go to the below mentioned paths and delete the files.

Magento Root > var > cache > Delete all files

Magento Root > var > page_cache > Delete all files

Magento Root > var > session > Delete all files

6) Change the behavior of symlinks for some static resources as mentioned below:-

When Magento 2 is not in production mode, it will try to create symlinks for some static resources on local server. We have to change that behavior of Magento 2 by going to edit ROOT > app > etc > di.xml file. Open up di.xml in your favorite code editor, find the virtualType name="developerMaterialization" section. In that section below, you will find an item <item name="view_preprocessed" xsi:type="object"> which needs to be modified. You can modify it by changing the following content:

Magento\Framework\App\View\Asset\MaterializationStrategy\Symlink

To:

Magento\Framework\App\View\Asset\MaterializationStrategy\Copy

7) Delete all the files except **.htaccess**

Magento Root > pub > static > Delete all files except **.htaccess**

ITS DONE. Now you may run the magento Front and Backend URL

share|improve this answer

Run the following commands:

php bin/magento setup:static-content:deploy
php bin/magento setup:upgrade
php bin/magento setup:di:compile 
php bin/magento cache:clean
share|improve this answer

1- Modify the app/etc/di.xml file by changing the following content:

Magento\Framework\App\View\Asset\MaterializationStrategy\Symlink

To:

Magento\Framework\App\View\Asset\MaterializationStrategy\Copy

2- sudo php /var/www/html/magento2ce/bin/magento setup:static-content:deploy

share|improve this answer

Not need to edit di.xml. We were facing js loading errors while symlinks enabled.
Lots of;

TypeError: $.widget is not a function

Just close symlink

Advanced > Developer > Template Settings > Allow Symlinks > No

After closing it, may be not deployed resources loads slowly for first time but js errors gone.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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