问题
I have installed the magento2 successfully but there are a lot of js error.
When see the console log through the firebug it shows a lot of errors and is there any thing else to config for the magento css and js.

回答1:
try following :
make bin/magento executable
chmod +x bin/magento
Clear cache etc in var folder
rm -rf var/cache/ var/di/ var/generation/ var/page_cache/
Run Setup ( if any thing missing )
bin/magento setup:upgrade
Deploy Static Content
bin/magento setup:static-content:deploy
Give Permission to var & pub folders
chmod -R 777 pub/ var/
now all the static files containing js, css etc will be deployed in pub/static folder
回答2:
Problem solved ...
There is a 'cache' system for these static resources. navigate to the folder dev/tools/Magento/Tools/View
Run the below command in the terminal
php deploy.php
After running this command css and other files created under the Pub/static/ folder and all the css will appear and page look fine.
回答3:
Remove all files and folder in pub/static except .htaccess and then run:
php bin/magento setup:static-content:deploy
回答4:
You can try after giving full permission to magento folder
回答5:
I had the same problem. I've deleted .htaccess
file from pub/static
folder by mistake.
I copied the file from the original installation to pub/static
directory.
来源:https://stackoverflow.com/questions/27646623/i-have-installed-the-magento2-successfully-but-there-are-a-lot-of-js-error