cancel
Showing results for 
Search instead for 
Did you mean: 

Error show when changing from Dev to Production Mode

Error show when changing from Dev to Production Mode

Hi guys, my site have been running on developer mode and i wanted to change it production due to speeding issue and when i change it to production mode the site throws error please see down below anyone know why is that?

 

1 exception(s):
Exception #0 (Magento\Framework\Exception\FileSystemException): The path "/var/www/html/pub/static/frontend/Magento/Servito/nl_NL" is not writable.

Exception #0 (Magento\Framework\Exception\FileSystemException): The path "/var/www/html/pub/static/frontend/Magento/Servito/nl_NL" is not writable.
<pre>#1 Magento\Framework\Filesystem\Directory\Write->openFile() called at [vendor/magento/framework/Filesystem/Directory/Write.php:341]
#2 Magento\Framework\Filesystem\Directory\Write->writeFile() called at [vendor/magento/module-require-js/Model/FileManager.php:135]
#3 Magento\RequireJs\Model\FileManager->ensureSourceFile() called at [vendor/magento/module-require-js/Model/FileManager.php:63]
#4 Magento\RequireJs\Model\FileManager->createRequireJsConfigAsset() called at [vendor/magento/module-require-js/Block/Html/Head/Config.php:126]
#5 Magento\RequireJs\Block\Html\Head\Config->_prepareLayout() called at [vendor/magento/framework/View/Element/AbstractBlock.php:285]
#6 Magento\Framework\View\Element\AbstractBlock->setLayout() called at [vendor/magento/framework/View/Layout/Generator/Block.php:149]
#7 Magento\Framework\View\Layout\Generator\Block->process() called at [vendor/magento/framework/View/Layout/GeneratorPool.php:81]
#8 Magento\Framework\View\Layout\GeneratorPool->process() called at [vendor/magento/framework/View/Layout.php:350]
#9 Magento\Framework\View\Layout->generateElements() called at [vendor/magento/framework/View/Layout/Builder.php:129]
#10 Magento\Framework\View\Layout\Builder->generateLayoutBlocks() called at [vendor/magento/framework/View/Page/Builder.php:55]
#11 Magento\Framework\View\Page\Builder->generateLayoutBlocks() called at [vendor/magento/framework/View/Layout/Builder.php:65]
#12 Magento\Framework\View\Layout\Builder->build() called at [vendor/magento/framework/View/Layout.php:257]
#13 Magento\Framework\View\Layout->build() called at [vendor/magento/framework/View/Layout.php:882]
#14 Magento\Framework\View\Layout->getBlock() called at [vendor/magento/module-cms/Helper/Page.php:215]
#15 Magento\Cms\Helper\Page->prepareResultPage() called at [vendor/magento/module-cms/Controller/Index/Index.php:74]
#16 Magento\Cms\Controller\Index\Index->execute() called at [vendor/magento/framework/App/Action/Action.php:108]
#17 Magento\Framework\App\Action\Action->dispatch() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#18 Magento\Cms\Controller\Index\Index\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#19 Magento\Cms\Controller\Index\Index\Interceptor->Magento\Framework\Interception\{closure}() called at [app/code/Bss/Paymentshipping/Plugin/App/Action/Context.php:72]
#20 Bss\Paymentshipping\Plugin\App\Action\Context->aroundDispatch() called at [vendor/magento/framework/Interception/Interceptor.php:135]
#21 Magento\Cms\Controller\Index\Index\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#22 Magento\Cms\Controller\Index\Index\Interceptor->___callPlugins() called at [generated/code/Magento/Cms/Controller/Index/Index/Interceptor.php:26]
#23 Magento\Cms\Controller\Index\Index\Interceptor->dispatch() called at [vendor/magento/framework/App/FrontController.php:159]
#24 Magento\Framework\App\FrontController->processRequest() called at [vendor/magento/framework/App/FrontController.php:99]
#25 Magento\Framework\App\FrontController->dispatch() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#26 Magento\Framework\App\FrontController\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#27 Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/module-store/App/FrontController/Plugin/RequestPreprocessor.php:99]
#28 Magento\Store\App\FrontController\Plugin\RequestPreprocessor->aroundDispatch() called at [vendor/magento/framework/Interception/Interceptor.php:135]
#29 Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php:69]
#30 Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch() called at [vendor/magento/framework/Interception/Interceptor.php:135]
#31 Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#32 Magento\Framework\App\FrontController\Interceptor->___callPlugins() called at [generated/code/Magento/Framework/App/FrontController/Interceptor.php:26]
#33 Magento\Framework\App\FrontController\Interceptor->dispatch() called at [vendor/magento/framework/App/Http.php:116]
#34 Magento\Framework\App\Http->launch() called at [vendor/magento/framework/App/Bootstrap.php:261]
#35 Magento\Framework\App\Bootstrap->run() called at [pub/index.php:40]
</pre>

1 REPLY 1

Re: Error show when changing from Dev to Production Mode

The error message you provided suggests that the path "/var/www/html/pub/static/frontend/Magento/Servito/nl_NL" is not writable. In other words, the system is unable to write or modify files in this directory.

 

To resolve this issue, you need to ensure that the folder "/var/www/html/pub/static/frontend/Magento/Servito/nl_NL" has the correct permissions set.

 

Check if the owner of the folder is the same as the user running the Magento application.

You can use the command ls -la /var/www/html/pub/static/frontend/Magento/Servito/nl_NL to check the folder permissions.

The output of this command should show the owner and group of the folder, as well as the permissions for each user type (owner, group, and others).

 

You can then use the command chmod to modify the folder permissions. For example, to give full permissions to the owner, group, and others, you can use the command sudo chmod 777 /var/www/html/pub/static/frontend/Magento/Servito/nl_NL.

 

However, keep in mind that giving full permissions to all users may not be the most secure solution. It is recommended to set the minimum necessary permissions required for the Magento application to work correctly.

 

You may need to consult with a developer or a system administrator to determine the correct permissions for your specific setup.

Was my answer helpful? You can accept it as a solution.
175+ professional extensions
Need a developer?Hire Magento Developer