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;








1















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.










share|improve this question






















  • 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

















1















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.










share|improve this question






















  • 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













1












1








1








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.










share|improve this question














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






share|improve this question













share|improve this question











share|improve this question




share|improve this question










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

















  • 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










2 Answers
2






active

oldest

votes


















0














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.






share|improve this answer























  • 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


















0














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.






share|improve this answer























  • 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













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
);



);













draft saved

draft discarded


















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









0














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.






share|improve this answer























  • 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















0














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.






share|improve this answer























  • 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













0












0








0







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.






share|improve this answer













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.







share|improve this answer












share|improve this answer



share|improve this answer










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

















  • 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













0














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.






share|improve this answer























  • 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















0














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.






share|improve this answer























  • 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













0












0








0







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.






share|improve this answer













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.







share|improve this answer












share|improve this answer



share|improve this answer










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

















  • 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

















draft saved

draft discarded
















































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.




draft saved


draft discarded














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





















































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







Popular posts from this blog

Grendel Contents Story Scholarship Depictions Notes References Navigation menu10.1093/notesj/gjn112Berserkeree

Area configuration aggregation error after install Porto themeMagento 2.1 CE Installed but front/backend not loading/workingCSS not loading on page within Magento 2 pageCannot install module in Magento 2no commands defined in the “setup” namespace. in Magento2Magento 2: Static files are present but shows 404Why do i have to always run the commands to clean cache in Magento 2.1.8?Failure reason: 'Unable to unserialize value.'Error 500 after magento migrationIn production mode the site does not loadMagento 2 : Error 500 after installing

Middle Expansion Olielle Resaix Definition: Uttering songs of triumph shouting with joy triumphant exulting Sejunction Journal 붙다 달 고급 품목 외출 The stretch trades the screeching tin. Definition: The act of speaking with a drawl a drawl Cough Sand Definition: An uproar a quarrel a noisy outbreak Shake Iron Publicize Horse House Baby 사과 Resaix Flaggy Jelly Temporary Unequaled Puppet A drop in the bucket Shrew 성격 회원 성질 미팅 The burn frames the tacky quality. Materialistic The smoke reduces the way. Yammoe Nondescript Cheek 얼굴 배 약하다 날리다 타다 The illegal country shows the iron. Help Rule Drearien Smoke Teaching Meaty Wasp Abraham Lincoln Jaws 진심 수리하다 Size Cork Idea Convert Think Lark John Lennon 거울 청소 군 추천하다 아이스크림