Static files not available in developer modeMagento 2 developer mode doesn't regenerate static files automaticallyMagento 2: Is deploying static content necessary in developer mode?Developer mode issuemagento2 developer mode issueAbout error while enabling developer modemagento2 developer mode not properly setfailed to open stream: No such file or directory for static-content deployM2 can't activate developer modeMagento_Payment/translate not included in requirejs config for mixinsHow to add custom less file for particular page (product listing page)
What do I need to see before Spider-Man: Far From Home?
What is the fundamental difference between catching whales and hunting other animals?
Why do people prefer metropolitan areas, considering monsters and villains?
What's the big deal about the Nazgûl losing their horses?
Advice for making/keeping shredded chicken moist?
How predictable is $RANDOM really?
How can I use my cell phone's light as a reading light?
How to reclaim personal item I've lent to the office without burning bridges?
How to say "just a precision" properly in English?
White's last move?
Is it acceptable that I plot a time-series figure with years increasing from right to left?
Horror film with a pregnant woman strapped to a bed and creatures that don't like light
How would a sea turtle end up on its back?
Why does this function pointer assignment work when assigned directly but not with the conditional operator?
Attach a visible light telescope to the outside of the ISS
What are some bad ways to subvert tropes?
Did Stalin kill all Soviet officers involved in the Winter War?
Will Jimmy fall off his platform?
Do intermediate subdomains need to exist?
What is the highest level of accuracy in motion control a Victorian society could achieve?
Why no parachutes in the Orion AA2 abort test?
How to deal with a Murder Hobo Paladin?
Wouldn't putting an electronic key inside a small Faraday cage render it completely useless?
Can a USB hub be used to access a drive from two devices?
Static files not available in developer mode
Magento 2 developer mode doesn't regenerate static files automaticallyMagento 2: Is deploying static content necessary in developer mode?Developer mode issuemagento2 developer mode issueAbout error while enabling developer modemagento2 developer mode not properly setfailed to open stream: No such file or directory for static-content deployM2 can't activate developer modeMagento_Payment/translate not included in requirejs config for mixinsHow to add custom less file for particular page (product listing page)
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I'm running Magento 2.2.2 in developer mode.
When I try to display a page, the static files are not available unless I remove all the pub folder content with rm -R pub/static/*
Once it's done, the static files are available only one time. If I refresh the page, they're gone :
Loading failed for the <script> with source “pub/static/adminhtml/Magento/backend/en_US/requirejs/require.js”.
(same error for several other js and css files)
I tried setup:static-content:deploy but it doesn't fix the issue.
After working on it for several hours, my guess is that something is wrong with the symlink but I don't get where, when I use readlink the path is correct : lib/web/requirejs/require.js.
Any help would be greatly appreciated.
magento2.2 developer-mode
add a comment |
I'm running Magento 2.2.2 in developer mode.
When I try to display a page, the static files are not available unless I remove all the pub folder content with rm -R pub/static/*
Once it's done, the static files are available only one time. If I refresh the page, they're gone :
Loading failed for the <script> with source “pub/static/adminhtml/Magento/backend/en_US/requirejs/require.js”.
(same error for several other js and css files)
I tried setup:static-content:deploy but it doesn't fix the issue.
After working on it for several hours, my guess is that something is wrong with the symlink but I don't get where, when I use readlink the path is correct : lib/web/requirejs/require.js.
Any help would be greatly appreciated.
magento2.2 developer-mode
issue might because of permission of static directory, so please set permission first
– Aasim Goriya
Jan 29 '18 at 11:25
I have checked all the permissions following this : devdocs.magento.com/guides/v2.2/install-gde/prereq/…
– Manu
Jan 29 '18 at 18:03
add a comment |
I'm running Magento 2.2.2 in developer mode.
When I try to display a page, the static files are not available unless I remove all the pub folder content with rm -R pub/static/*
Once it's done, the static files are available only one time. If I refresh the page, they're gone :
Loading failed for the <script> with source “pub/static/adminhtml/Magento/backend/en_US/requirejs/require.js”.
(same error for several other js and css files)
I tried setup:static-content:deploy but it doesn't fix the issue.
After working on it for several hours, my guess is that something is wrong with the symlink but I don't get where, when I use readlink the path is correct : lib/web/requirejs/require.js.
Any help would be greatly appreciated.
magento2.2 developer-mode
I'm running Magento 2.2.2 in developer mode.
When I try to display a page, the static files are not available unless I remove all the pub folder content with rm -R pub/static/*
Once it's done, the static files are available only one time. If I refresh the page, they're gone :
Loading failed for the <script> with source “pub/static/adminhtml/Magento/backend/en_US/requirejs/require.js”.
(same error for several other js and css files)
I tried setup:static-content:deploy but it doesn't fix the issue.
After working on it for several hours, my guess is that something is wrong with the symlink but I don't get where, when I use readlink the path is correct : lib/web/requirejs/require.js.
Any help would be greatly appreciated.
magento2.2 developer-mode
magento2.2 developer-mode
asked Jan 29 '18 at 11:23
ManuManu
414 bronze badges
414 bronze badges
issue might because of permission of static directory, so please set permission first
– Aasim Goriya
Jan 29 '18 at 11:25
I have checked all the permissions following this : devdocs.magento.com/guides/v2.2/install-gde/prereq/…
– Manu
Jan 29 '18 at 18:03
add a comment |
issue might because of permission of static directory, so please set permission first
– Aasim Goriya
Jan 29 '18 at 11:25
I have checked all the permissions following this : devdocs.magento.com/guides/v2.2/install-gde/prereq/…
– Manu
Jan 29 '18 at 18:03
issue might because of permission of static directory, so please set permission first
– Aasim Goriya
Jan 29 '18 at 11:25
issue might because of permission of static directory, so please set permission first
– Aasim Goriya
Jan 29 '18 at 11:25
I have checked all the permissions following this : devdocs.magento.com/guides/v2.2/install-gde/prereq/…
– Manu
Jan 29 '18 at 18:03
I have checked all the permissions following this : devdocs.magento.com/guides/v2.2/install-gde/prereq/…
– Manu
Jan 29 '18 at 18:03
add a comment |
2 Answers
2
active
oldest
votes
first remove all files or folders inside :
1)pub/static (except .htaccess file inside static folder)
2) var/cache
than run commands in following order :
php bin/magento cache:flush
php bin/magento cache:clean
php bin/magento indexer:reindex
php bin/magento setup:di:compile
php bin/magento deploy:mode:set developer
php bin/magento setup:upgrade
php bin/magento cron:run
php bin/magento setup:static-content:deploy
and if you will still face error , set permissions :
Permission commands:
---------------------------------------
find . -type f -exec chmod 644 ; // 644 permission for files
find . -type d -exec chmod 755 ; // 755 permission for directory
find ./var -type d -exec chmod 777 ; // 777 permission for var folder
find ./pub/media -type d -exec chmod 777 ;
find ./pub/static -type d -exec chmod 777 ;
chmod 777 ./app/etc
chmod 644 ./app/etc/*.xml
-----------------------------------------------
also find "Symlink" keyword in app/etc/di.xml , remove it with Copy.
I have run all the commands you advised with no result. I have found and deleted<item name="view_preprocessed" xsi:type="object">MagentoFrameworkAppViewAssetMaterializationStrategySymlink</item>in app/etc/di.xml with no result either. Any other idea ? Thanks.
– Manu
Jan 29 '18 at 18:02
add a comment |
When You remove pub/static/* folder, You removed .htaccess file.
Keep in mind never delete pub/static/.htaccess
You can download .htaccess file from the official Magento 2 repository. That will solve your problem.
Actually, ´rm -R pub/static/*´ doesn't remove the .htaccess (which is hidden), read here : devdocs.magento.com/guides/v2.0/howdoi/clean_static_cache.html However, I tried to replace the .htaccess with the one from the M2 repository, but it doesn't solve the problem.
– Manu
Jan 29 '18 at 14:47
Please check front folder static folder after deploy content
– Suresh Chikani
Jan 29 '18 at 14:49
Checked : same problem with the frontend files.
– Manu
Jan 29 '18 at 18:10
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%2f211325%2fstatic-files-not-available-in-developer-mode%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
first remove all files or folders inside :
1)pub/static (except .htaccess file inside static folder)
2) var/cache
than run commands in following order :
php bin/magento cache:flush
php bin/magento cache:clean
php bin/magento indexer:reindex
php bin/magento setup:di:compile
php bin/magento deploy:mode:set developer
php bin/magento setup:upgrade
php bin/magento cron:run
php bin/magento setup:static-content:deploy
and if you will still face error , set permissions :
Permission commands:
---------------------------------------
find . -type f -exec chmod 644 ; // 644 permission for files
find . -type d -exec chmod 755 ; // 755 permission for directory
find ./var -type d -exec chmod 777 ; // 777 permission for var folder
find ./pub/media -type d -exec chmod 777 ;
find ./pub/static -type d -exec chmod 777 ;
chmod 777 ./app/etc
chmod 644 ./app/etc/*.xml
-----------------------------------------------
also find "Symlink" keyword in app/etc/di.xml , remove it with Copy.
I have run all the commands you advised with no result. I have found and deleted<item name="view_preprocessed" xsi:type="object">MagentoFrameworkAppViewAssetMaterializationStrategySymlink</item>in app/etc/di.xml with no result either. Any other idea ? Thanks.
– Manu
Jan 29 '18 at 18:02
add a comment |
first remove all files or folders inside :
1)pub/static (except .htaccess file inside static folder)
2) var/cache
than run commands in following order :
php bin/magento cache:flush
php bin/magento cache:clean
php bin/magento indexer:reindex
php bin/magento setup:di:compile
php bin/magento deploy:mode:set developer
php bin/magento setup:upgrade
php bin/magento cron:run
php bin/magento setup:static-content:deploy
and if you will still face error , set permissions :
Permission commands:
---------------------------------------
find . -type f -exec chmod 644 ; // 644 permission for files
find . -type d -exec chmod 755 ; // 755 permission for directory
find ./var -type d -exec chmod 777 ; // 777 permission for var folder
find ./pub/media -type d -exec chmod 777 ;
find ./pub/static -type d -exec chmod 777 ;
chmod 777 ./app/etc
chmod 644 ./app/etc/*.xml
-----------------------------------------------
also find "Symlink" keyword in app/etc/di.xml , remove it with Copy.
I have run all the commands you advised with no result. I have found and deleted<item name="view_preprocessed" xsi:type="object">MagentoFrameworkAppViewAssetMaterializationStrategySymlink</item>in app/etc/di.xml with no result either. Any other idea ? Thanks.
– Manu
Jan 29 '18 at 18:02
add a comment |
first remove all files or folders inside :
1)pub/static (except .htaccess file inside static folder)
2) var/cache
than run commands in following order :
php bin/magento cache:flush
php bin/magento cache:clean
php bin/magento indexer:reindex
php bin/magento setup:di:compile
php bin/magento deploy:mode:set developer
php bin/magento setup:upgrade
php bin/magento cron:run
php bin/magento setup:static-content:deploy
and if you will still face error , set permissions :
Permission commands:
---------------------------------------
find . -type f -exec chmod 644 ; // 644 permission for files
find . -type d -exec chmod 755 ; // 755 permission for directory
find ./var -type d -exec chmod 777 ; // 777 permission for var folder
find ./pub/media -type d -exec chmod 777 ;
find ./pub/static -type d -exec chmod 777 ;
chmod 777 ./app/etc
chmod 644 ./app/etc/*.xml
-----------------------------------------------
also find "Symlink" keyword in app/etc/di.xml , remove it with Copy.
first remove all files or folders inside :
1)pub/static (except .htaccess file inside static folder)
2) var/cache
than run commands in following order :
php bin/magento cache:flush
php bin/magento cache:clean
php bin/magento indexer:reindex
php bin/magento setup:di:compile
php bin/magento deploy:mode:set developer
php bin/magento setup:upgrade
php bin/magento cron:run
php bin/magento setup:static-content:deploy
and if you will still face error , set permissions :
Permission commands:
---------------------------------------
find . -type f -exec chmod 644 ; // 644 permission for files
find . -type d -exec chmod 755 ; // 755 permission for directory
find ./var -type d -exec chmod 777 ; // 777 permission for var folder
find ./pub/media -type d -exec chmod 777 ;
find ./pub/static -type d -exec chmod 777 ;
chmod 777 ./app/etc
chmod 644 ./app/etc/*.xml
-----------------------------------------------
also find "Symlink" keyword in app/etc/di.xml , remove it with Copy.
answered Jan 29 '18 at 11:56
Hamza MustafaHamza Mustafa
1782 silver badges15 bronze badges
1782 silver badges15 bronze badges
I have run all the commands you advised with no result. I have found and deleted<item name="view_preprocessed" xsi:type="object">MagentoFrameworkAppViewAssetMaterializationStrategySymlink</item>in app/etc/di.xml with no result either. Any other idea ? Thanks.
– Manu
Jan 29 '18 at 18:02
add a comment |
I have run all the commands you advised with no result. I have found and deleted<item name="view_preprocessed" xsi:type="object">MagentoFrameworkAppViewAssetMaterializationStrategySymlink</item>in app/etc/di.xml with no result either. Any other idea ? Thanks.
– Manu
Jan 29 '18 at 18:02
I have run all the commands you advised with no result. I have found and deleted
<item name="view_preprocessed" xsi:type="object">MagentoFrameworkAppViewAssetMaterializationStrategySymlink</item> in app/etc/di.xml with no result either. Any other idea ? Thanks.– Manu
Jan 29 '18 at 18:02
I have run all the commands you advised with no result. I have found and deleted
<item name="view_preprocessed" xsi:type="object">MagentoFrameworkAppViewAssetMaterializationStrategySymlink</item> in app/etc/di.xml with no result either. Any other idea ? Thanks.– Manu
Jan 29 '18 at 18:02
add a comment |
When You remove pub/static/* folder, You removed .htaccess file.
Keep in mind never delete pub/static/.htaccess
You can download .htaccess file from the official Magento 2 repository. That will solve your problem.
Actually, ´rm -R pub/static/*´ doesn't remove the .htaccess (which is hidden), read here : devdocs.magento.com/guides/v2.0/howdoi/clean_static_cache.html However, I tried to replace the .htaccess with the one from the M2 repository, but it doesn't solve the problem.
– Manu
Jan 29 '18 at 14:47
Please check front folder static folder after deploy content
– Suresh Chikani
Jan 29 '18 at 14:49
Checked : same problem with the frontend files.
– Manu
Jan 29 '18 at 18:10
add a comment |
When You remove pub/static/* folder, You removed .htaccess file.
Keep in mind never delete pub/static/.htaccess
You can download .htaccess file from the official Magento 2 repository. That will solve your problem.
Actually, ´rm -R pub/static/*´ doesn't remove the .htaccess (which is hidden), read here : devdocs.magento.com/guides/v2.0/howdoi/clean_static_cache.html However, I tried to replace the .htaccess with the one from the M2 repository, but it doesn't solve the problem.
– Manu
Jan 29 '18 at 14:47
Please check front folder static folder after deploy content
– Suresh Chikani
Jan 29 '18 at 14:49
Checked : same problem with the frontend files.
– Manu
Jan 29 '18 at 18:10
add a comment |
When You remove pub/static/* folder, You removed .htaccess file.
Keep in mind never delete pub/static/.htaccess
You can download .htaccess file from the official Magento 2 repository. That will solve your problem.
When You remove pub/static/* folder, You removed .htaccess file.
Keep in mind never delete pub/static/.htaccess
You can download .htaccess file from the official Magento 2 repository. That will solve your problem.
answered Jan 29 '18 at 12:10
Suresh ChikaniSuresh Chikani
10.8k5 gold badges37 silver badges76 bronze badges
10.8k5 gold badges37 silver badges76 bronze badges
Actually, ´rm -R pub/static/*´ doesn't remove the .htaccess (which is hidden), read here : devdocs.magento.com/guides/v2.0/howdoi/clean_static_cache.html However, I tried to replace the .htaccess with the one from the M2 repository, but it doesn't solve the problem.
– Manu
Jan 29 '18 at 14:47
Please check front folder static folder after deploy content
– Suresh Chikani
Jan 29 '18 at 14:49
Checked : same problem with the frontend files.
– Manu
Jan 29 '18 at 18:10
add a comment |
Actually, ´rm -R pub/static/*´ doesn't remove the .htaccess (which is hidden), read here : devdocs.magento.com/guides/v2.0/howdoi/clean_static_cache.html However, I tried to replace the .htaccess with the one from the M2 repository, but it doesn't solve the problem.
– Manu
Jan 29 '18 at 14:47
Please check front folder static folder after deploy content
– Suresh Chikani
Jan 29 '18 at 14:49
Checked : same problem with the frontend files.
– Manu
Jan 29 '18 at 18:10
Actually, ´rm -R pub/static/*´ doesn't remove the .htaccess (which is hidden), read here : devdocs.magento.com/guides/v2.0/howdoi/clean_static_cache.html However, I tried to replace the .htaccess with the one from the M2 repository, but it doesn't solve the problem.
– Manu
Jan 29 '18 at 14:47
Actually, ´rm -R pub/static/*´ doesn't remove the .htaccess (which is hidden), read here : devdocs.magento.com/guides/v2.0/howdoi/clean_static_cache.html However, I tried to replace the .htaccess with the one from the M2 repository, but it doesn't solve the problem.
– Manu
Jan 29 '18 at 14:47
Please check front folder static folder after deploy content
– Suresh Chikani
Jan 29 '18 at 14:49
Please check front folder static folder after deploy content
– Suresh Chikani
Jan 29 '18 at 14:49
Checked : same problem with the frontend files.
– Manu
Jan 29 '18 at 18:10
Checked : same problem with the frontend files.
– Manu
Jan 29 '18 at 18:10
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%2f211325%2fstatic-files-not-available-in-developer-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
issue might because of permission of static directory, so please set permission first
– Aasim Goriya
Jan 29 '18 at 11:25
I have checked all the permissions following this : devdocs.magento.com/guides/v2.2/install-gde/prereq/…
– Manu
Jan 29 '18 at 18:03