Magento 2.1 not loading some js and css in production mode
I am working on mageno 2.1.10 and I have tried setting mod to production from development by using the following solutions:
solution 1.
php bin/magento deploy:mod:set production
And it gave me the following error:
Something went wrong while deploying static content. See the error log for details.
Command returned non-zero exit code:
/usr/bin/php5.6 -f
/var/www/html/Katherine/bin/magento setup:static-content:deploy en_US
But There were no errors in error_log
After this error I have entered the following commands in terminal:
php bin/magento s:d:c (For di compile)
php bin/magento s:s:d (For static-content deploy)
And then some of the js and css were not loading on frontend.
Solution 2.
After the above solution didn't work for me then I have again set mod to developer and deployed static content which brough my store back to life.
Then I have tried the following code for setting it to production mode:
bin/magento setup:upgrade; bin/magento indexer:reindex; bin/magento deploy:mode:set production -s; bin/magento setup:di:compile; bin/magento setup:static-content:deploy
By doing this the frontend totally broke and none of the css/js were being loaded.
Also tried these in Database:
UPDATE `core_config_data` SET `value`='0' WHERE `path`='dev/js/merge_files';
UPDATE `core_config_data` SET `value`='0' WHERE `path`='dev/js/enable_js_bundling';
UPDATE `core_config_data` SET `value`='0' WHERE `path`='dev/js/minify_files';
UPDATE `core_config_data` SET `value`='0' WHERE `path`='dev/css/merge_css_files';
UPDATE `core_config_data` SET `value`='0' WHERE `path`='dev/css/minify_files';
This too didn't help and finally I ended up by setting it to developer mod.
Update 1
I have tried the answer provided by "Ayaz" on local host and this seems to be working fine. But on live server none of the css or js are being loaded
Following are the errors in browser console after trying this solution on live server:
CSS: Refused to apply style from 'website.com/pub/static/frontend/Pack/Theme/en_US/ThousandMonkeys_SocialButtons/css/social.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
JS: Refused to execute script from 'website.com/pub/static/frontend/Pack/Theme/en_US/owl.carousel/owl.carousel.min.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
There also some js files with console error : "net::ERR_ABORTED"
Update 2
I have checked the browser console and it is loading some css and js files which are (I think) from Magento base. The ones which are getting 404 in console are all the custom module's css/js
Image
Update 3
When in developer mode, I have tried to find the files in pub/static which were not found/deployed in production mode. These files were all shown as a link in FTP (FileZilla).
Update 4
So now I have disabled all the modules that are in app/code by adding Zeros for them in config.php. I have changed the theme to Magento Blank from admin. But still, when setting mod to production is ends up with the same error:
Command returned non-zero exit code: /usr/bin/php5.6 -f /var/www/html/Katherine/bin/magento setup:static-content:deploy en_US
Following are the logs generated when tried enabling production mod:
debug.log and system.log, there was nothing in exception log.
P.S: I need to enable production mod in order to get minified css/js/html
How to debug and where should I look to fix this?
Is there any way to minify js in developer mode itself?
production-mode magento-2.1.10
|
show 2 more comments
I am working on mageno 2.1.10 and I have tried setting mod to production from development by using the following solutions:
solution 1.
php bin/magento deploy:mod:set production
And it gave me the following error:
Something went wrong while deploying static content. See the error log for details.
Command returned non-zero exit code:
/usr/bin/php5.6 -f
/var/www/html/Katherine/bin/magento setup:static-content:deploy en_US
But There were no errors in error_log
After this error I have entered the following commands in terminal:
php bin/magento s:d:c (For di compile)
php bin/magento s:s:d (For static-content deploy)
And then some of the js and css were not loading on frontend.
Solution 2.
After the above solution didn't work for me then I have again set mod to developer and deployed static content which brough my store back to life.
Then I have tried the following code for setting it to production mode:
bin/magento setup:upgrade; bin/magento indexer:reindex; bin/magento deploy:mode:set production -s; bin/magento setup:di:compile; bin/magento setup:static-content:deploy
By doing this the frontend totally broke and none of the css/js were being loaded.
Also tried these in Database:
UPDATE `core_config_data` SET `value`='0' WHERE `path`='dev/js/merge_files';
UPDATE `core_config_data` SET `value`='0' WHERE `path`='dev/js/enable_js_bundling';
UPDATE `core_config_data` SET `value`='0' WHERE `path`='dev/js/minify_files';
UPDATE `core_config_data` SET `value`='0' WHERE `path`='dev/css/merge_css_files';
UPDATE `core_config_data` SET `value`='0' WHERE `path`='dev/css/minify_files';
This too didn't help and finally I ended up by setting it to developer mod.
Update 1
I have tried the answer provided by "Ayaz" on local host and this seems to be working fine. But on live server none of the css or js are being loaded
Following are the errors in browser console after trying this solution on live server:
CSS: Refused to apply style from 'website.com/pub/static/frontend/Pack/Theme/en_US/ThousandMonkeys_SocialButtons/css/social.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
JS: Refused to execute script from 'website.com/pub/static/frontend/Pack/Theme/en_US/owl.carousel/owl.carousel.min.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
There also some js files with console error : "net::ERR_ABORTED"
Update 2
I have checked the browser console and it is loading some css and js files which are (I think) from Magento base. The ones which are getting 404 in console are all the custom module's css/js
Image
Update 3
When in developer mode, I have tried to find the files in pub/static which were not found/deployed in production mode. These files were all shown as a link in FTP (FileZilla).
Update 4
So now I have disabled all the modules that are in app/code by adding Zeros for them in config.php. I have changed the theme to Magento Blank from admin. But still, when setting mod to production is ends up with the same error:
Command returned non-zero exit code: /usr/bin/php5.6 -f /var/www/html/Katherine/bin/magento setup:static-content:deploy en_US
Following are the logs generated when tried enabling production mod:
debug.log and system.log, there was nothing in exception log.
P.S: I need to enable production mod in order to get minified css/js/html
How to debug and where should I look to fix this?
Is there any way to minify js in developer mode itself?
production-mode magento-2.1.10
can you write full url of js ,css which error come in your browser console
– Feedlay Technologies
Jul 27 '18 at 11:52
@FeedlayTechnologies CSS: Refused to apply style from 'website.com/pub/static/frontend/Pack/Theme/en_US/ThousandMonkeys_SocialButtons/css/social.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled. JS: Refused to execute script from 'website.com/pub/static/frontend/Pack/Theme/en_US/owl.carousel/owl.carousel.min.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled. There also some js files with console error : "net::ERR_ABORTED"
– Wasiq Shahrukh
Jul 31 '18 at 5:20
I have added image of the errors
– Wasiq Shahrukh
Jul 31 '18 at 11:24
what are are the errors in<project_root>/var/log
? Specifically debug.log system.log and exception.log.
– Chris Anderson
Aug 1 '18 at 16:30
@ChrisAnderson - I have added Update 4 to my question.
– Wasiq Shahrukh
Aug 2 '18 at 6:21
|
show 2 more comments
I am working on mageno 2.1.10 and I have tried setting mod to production from development by using the following solutions:
solution 1.
php bin/magento deploy:mod:set production
And it gave me the following error:
Something went wrong while deploying static content. See the error log for details.
Command returned non-zero exit code:
/usr/bin/php5.6 -f
/var/www/html/Katherine/bin/magento setup:static-content:deploy en_US
But There were no errors in error_log
After this error I have entered the following commands in terminal:
php bin/magento s:d:c (For di compile)
php bin/magento s:s:d (For static-content deploy)
And then some of the js and css were not loading on frontend.
Solution 2.
After the above solution didn't work for me then I have again set mod to developer and deployed static content which brough my store back to life.
Then I have tried the following code for setting it to production mode:
bin/magento setup:upgrade; bin/magento indexer:reindex; bin/magento deploy:mode:set production -s; bin/magento setup:di:compile; bin/magento setup:static-content:deploy
By doing this the frontend totally broke and none of the css/js were being loaded.
Also tried these in Database:
UPDATE `core_config_data` SET `value`='0' WHERE `path`='dev/js/merge_files';
UPDATE `core_config_data` SET `value`='0' WHERE `path`='dev/js/enable_js_bundling';
UPDATE `core_config_data` SET `value`='0' WHERE `path`='dev/js/minify_files';
UPDATE `core_config_data` SET `value`='0' WHERE `path`='dev/css/merge_css_files';
UPDATE `core_config_data` SET `value`='0' WHERE `path`='dev/css/minify_files';
This too didn't help and finally I ended up by setting it to developer mod.
Update 1
I have tried the answer provided by "Ayaz" on local host and this seems to be working fine. But on live server none of the css or js are being loaded
Following are the errors in browser console after trying this solution on live server:
CSS: Refused to apply style from 'website.com/pub/static/frontend/Pack/Theme/en_US/ThousandMonkeys_SocialButtons/css/social.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
JS: Refused to execute script from 'website.com/pub/static/frontend/Pack/Theme/en_US/owl.carousel/owl.carousel.min.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
There also some js files with console error : "net::ERR_ABORTED"
Update 2
I have checked the browser console and it is loading some css and js files which are (I think) from Magento base. The ones which are getting 404 in console are all the custom module's css/js
Image
Update 3
When in developer mode, I have tried to find the files in pub/static which were not found/deployed in production mode. These files were all shown as a link in FTP (FileZilla).
Update 4
So now I have disabled all the modules that are in app/code by adding Zeros for them in config.php. I have changed the theme to Magento Blank from admin. But still, when setting mod to production is ends up with the same error:
Command returned non-zero exit code: /usr/bin/php5.6 -f /var/www/html/Katherine/bin/magento setup:static-content:deploy en_US
Following are the logs generated when tried enabling production mod:
debug.log and system.log, there was nothing in exception log.
P.S: I need to enable production mod in order to get minified css/js/html
How to debug and where should I look to fix this?
Is there any way to minify js in developer mode itself?
production-mode magento-2.1.10
I am working on mageno 2.1.10 and I have tried setting mod to production from development by using the following solutions:
solution 1.
php bin/magento deploy:mod:set production
And it gave me the following error:
Something went wrong while deploying static content. See the error log for details.
Command returned non-zero exit code:
/usr/bin/php5.6 -f
/var/www/html/Katherine/bin/magento setup:static-content:deploy en_US
But There were no errors in error_log
After this error I have entered the following commands in terminal:
php bin/magento s:d:c (For di compile)
php bin/magento s:s:d (For static-content deploy)
And then some of the js and css were not loading on frontend.
Solution 2.
After the above solution didn't work for me then I have again set mod to developer and deployed static content which brough my store back to life.
Then I have tried the following code for setting it to production mode:
bin/magento setup:upgrade; bin/magento indexer:reindex; bin/magento deploy:mode:set production -s; bin/magento setup:di:compile; bin/magento setup:static-content:deploy
By doing this the frontend totally broke and none of the css/js were being loaded.
Also tried these in Database:
UPDATE `core_config_data` SET `value`='0' WHERE `path`='dev/js/merge_files';
UPDATE `core_config_data` SET `value`='0' WHERE `path`='dev/js/enable_js_bundling';
UPDATE `core_config_data` SET `value`='0' WHERE `path`='dev/js/minify_files';
UPDATE `core_config_data` SET `value`='0' WHERE `path`='dev/css/merge_css_files';
UPDATE `core_config_data` SET `value`='0' WHERE `path`='dev/css/minify_files';
This too didn't help and finally I ended up by setting it to developer mod.
Update 1
I have tried the answer provided by "Ayaz" on local host and this seems to be working fine. But on live server none of the css or js are being loaded
Following are the errors in browser console after trying this solution on live server:
CSS: Refused to apply style from 'website.com/pub/static/frontend/Pack/Theme/en_US/ThousandMonkeys_SocialButtons/css/social.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
JS: Refused to execute script from 'website.com/pub/static/frontend/Pack/Theme/en_US/owl.carousel/owl.carousel.min.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
There also some js files with console error : "net::ERR_ABORTED"
Update 2
I have checked the browser console and it is loading some css and js files which are (I think) from Magento base. The ones which are getting 404 in console are all the custom module's css/js
Image
Update 3
When in developer mode, I have tried to find the files in pub/static which were not found/deployed in production mode. These files were all shown as a link in FTP (FileZilla).
Update 4
So now I have disabled all the modules that are in app/code by adding Zeros for them in config.php. I have changed the theme to Magento Blank from admin. But still, when setting mod to production is ends up with the same error:
Command returned non-zero exit code: /usr/bin/php5.6 -f /var/www/html/Katherine/bin/magento setup:static-content:deploy en_US
Following are the logs generated when tried enabling production mod:
debug.log and system.log, there was nothing in exception log.
P.S: I need to enable production mod in order to get minified css/js/html
How to debug and where should I look to fix this?
Is there any way to minify js in developer mode itself?
production-mode magento-2.1.10
production-mode magento-2.1.10
edited Aug 2 '18 at 10:54
Wasiq Shahrukh
asked Jul 27 '18 at 11:45
Wasiq ShahrukhWasiq Shahrukh
3651222
3651222
can you write full url of js ,css which error come in your browser console
– Feedlay Technologies
Jul 27 '18 at 11:52
@FeedlayTechnologies CSS: Refused to apply style from 'website.com/pub/static/frontend/Pack/Theme/en_US/ThousandMonkeys_SocialButtons/css/social.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled. JS: Refused to execute script from 'website.com/pub/static/frontend/Pack/Theme/en_US/owl.carousel/owl.carousel.min.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled. There also some js files with console error : "net::ERR_ABORTED"
– Wasiq Shahrukh
Jul 31 '18 at 5:20
I have added image of the errors
– Wasiq Shahrukh
Jul 31 '18 at 11:24
what are are the errors in<project_root>/var/log
? Specifically debug.log system.log and exception.log.
– Chris Anderson
Aug 1 '18 at 16:30
@ChrisAnderson - I have added Update 4 to my question.
– Wasiq Shahrukh
Aug 2 '18 at 6:21
|
show 2 more comments
can you write full url of js ,css which error come in your browser console
– Feedlay Technologies
Jul 27 '18 at 11:52
@FeedlayTechnologies CSS: Refused to apply style from 'website.com/pub/static/frontend/Pack/Theme/en_US/ThousandMonkeys_SocialButtons/css/social.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled. JS: Refused to execute script from 'website.com/pub/static/frontend/Pack/Theme/en_US/owl.carousel/owl.carousel.min.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled. There also some js files with console error : "net::ERR_ABORTED"
– Wasiq Shahrukh
Jul 31 '18 at 5:20
I have added image of the errors
– Wasiq Shahrukh
Jul 31 '18 at 11:24
what are are the errors in<project_root>/var/log
? Specifically debug.log system.log and exception.log.
– Chris Anderson
Aug 1 '18 at 16:30
@ChrisAnderson - I have added Update 4 to my question.
– Wasiq Shahrukh
Aug 2 '18 at 6:21
can you write full url of js ,css which error come in your browser console
– Feedlay Technologies
Jul 27 '18 at 11:52
can you write full url of js ,css which error come in your browser console
– Feedlay Technologies
Jul 27 '18 at 11:52
@FeedlayTechnologies CSS: Refused to apply style from 'website.com/pub/static/frontend/Pack/Theme/en_US/ThousandMonkeys_SocialButtons/css/social.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled. JS: Refused to execute script from 'website.com/pub/static/frontend/Pack/Theme/en_US/owl.carousel/owl.carousel.min.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled. There also some js files with console error : "net::ERR_ABORTED"
– Wasiq Shahrukh
Jul 31 '18 at 5:20
@FeedlayTechnologies CSS: Refused to apply style from 'website.com/pub/static/frontend/Pack/Theme/en_US/ThousandMonkeys_SocialButtons/css/social.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled. JS: Refused to execute script from 'website.com/pub/static/frontend/Pack/Theme/en_US/owl.carousel/owl.carousel.min.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled. There also some js files with console error : "net::ERR_ABORTED"
– Wasiq Shahrukh
Jul 31 '18 at 5:20
I have added image of the errors
– Wasiq Shahrukh
Jul 31 '18 at 11:24
I have added image of the errors
– Wasiq Shahrukh
Jul 31 '18 at 11:24
what are are the errors in
<project_root>/var/log
? Specifically debug.log system.log and exception.log.– Chris Anderson
Aug 1 '18 at 16:30
what are are the errors in
<project_root>/var/log
? Specifically debug.log system.log and exception.log.– Chris Anderson
Aug 1 '18 at 16:30
@ChrisAnderson - I have added Update 4 to my question.
– Wasiq Shahrukh
Aug 2 '18 at 6:21
@ChrisAnderson - I have added Update 4 to my question.
– Wasiq Shahrukh
Aug 2 '18 at 6:21
|
show 2 more comments
3 Answers
3
active
oldest
votes
First of all set to production mode
php bin/magento deploy:mod:set productionclear static contents by following command
rm -rf var/di/* var/generation/* var/cache/* var/log/* var/page_cache/* var/session/* var/view_preprocessed/* pub/static/*
- Finally deploy static contents
php bin/magento setup:static-content:deploy
This did not worked for me.
– Wasiq Shahrukh
Jul 31 '18 at 9:10
add a comment |
I have tried all the things as mentioned in question but none of these worked.
I have finally fixed this by installing fresh magento with same version and reinstalling all the modules one by one.
After installing each module I have tried the following command:
php bin/magento s:up; php bin/magento s:d:c; php bin/magento s:s:d; php bin/magento c:f
And all the modules were successfully installed on the same server one after the other without any errors.
Now I am able to deploy its mode to production.
add a comment |
For me, I'm currently already in production mode Magento 2.3, I just wanted to apply some new code changes.
bin/magento setup:static-content:deploy -f
bin/magento cache:flush
that was it.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "479"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f236246%2fmagento-2-1-not-loading-some-js-and-css-in-production-mode%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
First of all set to production mode
php bin/magento deploy:mod:set productionclear static contents by following command
rm -rf var/di/* var/generation/* var/cache/* var/log/* var/page_cache/* var/session/* var/view_preprocessed/* pub/static/*
- Finally deploy static contents
php bin/magento setup:static-content:deploy
This did not worked for me.
– Wasiq Shahrukh
Jul 31 '18 at 9:10
add a comment |
First of all set to production mode
php bin/magento deploy:mod:set productionclear static contents by following command
rm -rf var/di/* var/generation/* var/cache/* var/log/* var/page_cache/* var/session/* var/view_preprocessed/* pub/static/*
- Finally deploy static contents
php bin/magento setup:static-content:deploy
This did not worked for me.
– Wasiq Shahrukh
Jul 31 '18 at 9:10
add a comment |
First of all set to production mode
php bin/magento deploy:mod:set productionclear static contents by following command
rm -rf var/di/* var/generation/* var/cache/* var/log/* var/page_cache/* var/session/* var/view_preprocessed/* pub/static/*
- Finally deploy static contents
php bin/magento setup:static-content:deploy
First of all set to production mode
php bin/magento deploy:mod:set productionclear static contents by following command
rm -rf var/di/* var/generation/* var/cache/* var/log/* var/page_cache/* var/session/* var/view_preprocessed/* pub/static/*
- Finally deploy static contents
php bin/magento setup:static-content:deploy
answered Jul 27 '18 at 13:28
Muhammad AyazMuhammad Ayaz
1818
1818
This did not worked for me.
– Wasiq Shahrukh
Jul 31 '18 at 9:10
add a comment |
This did not worked for me.
– Wasiq Shahrukh
Jul 31 '18 at 9:10
This did not worked for me.
– Wasiq Shahrukh
Jul 31 '18 at 9:10
This did not worked for me.
– Wasiq Shahrukh
Jul 31 '18 at 9:10
add a comment |
I have tried all the things as mentioned in question but none of these worked.
I have finally fixed this by installing fresh magento with same version and reinstalling all the modules one by one.
After installing each module I have tried the following command:
php bin/magento s:up; php bin/magento s:d:c; php bin/magento s:s:d; php bin/magento c:f
And all the modules were successfully installed on the same server one after the other without any errors.
Now I am able to deploy its mode to production.
add a comment |
I have tried all the things as mentioned in question but none of these worked.
I have finally fixed this by installing fresh magento with same version and reinstalling all the modules one by one.
After installing each module I have tried the following command:
php bin/magento s:up; php bin/magento s:d:c; php bin/magento s:s:d; php bin/magento c:f
And all the modules were successfully installed on the same server one after the other without any errors.
Now I am able to deploy its mode to production.
add a comment |
I have tried all the things as mentioned in question but none of these worked.
I have finally fixed this by installing fresh magento with same version and reinstalling all the modules one by one.
After installing each module I have tried the following command:
php bin/magento s:up; php bin/magento s:d:c; php bin/magento s:s:d; php bin/magento c:f
And all the modules were successfully installed on the same server one after the other without any errors.
Now I am able to deploy its mode to production.
I have tried all the things as mentioned in question but none of these worked.
I have finally fixed this by installing fresh magento with same version and reinstalling all the modules one by one.
After installing each module I have tried the following command:
php bin/magento s:up; php bin/magento s:d:c; php bin/magento s:s:d; php bin/magento c:f
And all the modules were successfully installed on the same server one after the other without any errors.
Now I am able to deploy its mode to production.
answered Aug 10 '18 at 5:34
Wasiq ShahrukhWasiq Shahrukh
3651222
3651222
add a comment |
add a comment |
For me, I'm currently already in production mode Magento 2.3, I just wanted to apply some new code changes.
bin/magento setup:static-content:deploy -f
bin/magento cache:flush
that was it.
add a comment |
For me, I'm currently already in production mode Magento 2.3, I just wanted to apply some new code changes.
bin/magento setup:static-content:deploy -f
bin/magento cache:flush
that was it.
add a comment |
For me, I'm currently already in production mode Magento 2.3, I just wanted to apply some new code changes.
bin/magento setup:static-content:deploy -f
bin/magento cache:flush
that was it.
For me, I'm currently already in production mode Magento 2.3, I just wanted to apply some new code changes.
bin/magento setup:static-content:deploy -f
bin/magento cache:flush
that was it.
answered 24 mins ago
PathfinderPathfinder
13611
13611
add a comment |
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f236246%2fmagento-2-1-not-loading-some-js-and-css-in-production-mode%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
can you write full url of js ,css which error come in your browser console
– Feedlay Technologies
Jul 27 '18 at 11:52
@FeedlayTechnologies CSS: Refused to apply style from 'website.com/pub/static/frontend/Pack/Theme/en_US/ThousandMonkeys_SocialButtons/css/social.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled. JS: Refused to execute script from 'website.com/pub/static/frontend/Pack/Theme/en_US/owl.carousel/owl.carousel.min.js' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled. There also some js files with console error : "net::ERR_ABORTED"
– Wasiq Shahrukh
Jul 31 '18 at 5:20
I have added image of the errors
– Wasiq Shahrukh
Jul 31 '18 at 11:24
what are are the errors in
<project_root>/var/log
? Specifically debug.log system.log and exception.log.– Chris Anderson
Aug 1 '18 at 16:30
@ChrisAnderson - I have added Update 4 to my question.
– Wasiq Shahrukh
Aug 2 '18 at 6:21