cancel
Showing results for 
Search instead for 
Did you mean: 

first installation worked--but no CSS or images?

SOLVED

first installation worked--but no CSS or images?

I'm setting up a development server on nginx. Installation was successful. 

I was able to browse to the index page, and I just logged in to the admin. Terrific.

But it appears there's no CSS and I see a broken image at the top of the admin (/pub/static/version1562889101/adminhtml/Magento/backend/en_US/images/magento-icon.svg).

 

Any ideas on why these assets aren't loading?

Here's what I'm seeing when I inspect the page in the browser:

Refused to apply style from '<URL>' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
require.js:1 Failed to load resource: the server responded with a status of 404 ()
mixins.js:1 Failed to load resource: the server responded with a status of 404 ()
requirejs-config.js:1 Failed to load resource: the server responded with a status of 404 ()
polyfill.js:1 Failed to load resource: the server responded with a status of 404 ()
(index):29 Uncaught TypeError: require.config is not a function
    at (index):29
(index):99 Uncaught TypeError: require.config is not a function
    at (index):99
logo.svg:1 Failed to load resource: the server responded with a status of 404 ()

What do I do to fix this? Been Googling for an hour or so and trying different things, so far no dice.

 

Thanks very much.

1 ACCEPTED SOLUTION

Accepted Solutions

Re: first installation worked--but no CSS or images?

Hi @ed_geis 

 

After successful installation have you run the static-content:deploy command ?

 

if not then please copy from the below and run that command from your Magento root directory on the SSH Command line Terminal  :

 

php bin/magento setup:static-content:deploy -f
php bin/magento cache:clean
php bin/magento cache:flush


Hope it helps !

if issue solved,Click Kudos & Accept as Solution

View solution in original post

6 REPLIES 6

Re: first installation worked--but no CSS or images?

Hi @ed_geis 

 

After successful installation have you run the static-content:deploy command ?

 

if not then please copy from the below and run that command from your Magento root directory on the SSH Command line Terminal  :

 

php bin/magento setup:static-content:deploy -f
php bin/magento cache:clean
php bin/magento cache:flush


Hope it helps !

if issue solved,Click Kudos & Accept as Solution

Re: first installation worked--but no CSS or images?

Hello Ed_Geis,

 

When you first install Magento, Its by default set development mode to "Default" So you need to change you deploy mode "Default" to "Developer" follow these steps:

 

Change deploy mode to:

php bin/magento deploy:mode:set developer

  

Run these commands one by one:

php bin/magento setup:upgrade
php bin/magento setup:db-schema:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy

 After that run cache clean and reindex :

php bin/magento indexer:reindex
php bin/magento cache:clean
php bin/magento cache:flush

Hopefully it will help.

Magento 2 Professional Developer
https://nslayout.com/

Re: first installation worked--but no CSS or images?

Terrific, thanks for the prompt response. I will give your recommendation a shot later today and report back.

Re: first installation worked--but no CSS or images?

Thanks Manthan Dave, that did the trick. Much appreciated!

 

Onward!

 

I'm sure I'll be back with more questions.

Re: first installation worked--but no CSS or images?

Thanks for the tip on developer mode--I went ahead and switched like you suggested. I think I'm in business...at least until the next hurdle comes up!

Re: first installation worked--but no CSS or images?

This work for me. Now the admin work. Before it is just loading .  Thanks