1

We are using Magento Cloud Enterprise and using the Magento Version 2.2.

We are not able to delete the generated/ folder, has anybody else faced this issue before?

From comments:
We tried deleting inside generated, yet we couldn't delete the contents, we are getting a "Read-only Filesystem" error.

  • Can you please let us know, what method you are following to delete it e.g. manually or CLI and what message you are getting while deleting it? – Tejas Vyas Jan 4 '18 at 10:03
  • Magento Cloud uses a read only file system. Are you trying to deleted the generated folder itself (should not be possible)? Did you try deleting stuff inside generated/* (should be possible)? – 7ochem Jan 4 '18 at 10:04
  • As @7ochem suggesting, try deleting the contents inside. – Shyam Krishna Sreekumar Jan 4 '18 at 10:07
  • Thank you Guys, we tried deleting it inside generated , yet we couldn't delete the contents, we are getting , 'Read-only Filesystem' Error – Richard Valsalan Jan 4 '18 at 10:47
  • 1
    Aha, that's right. The generated folder is filled (generated) during the build process and is part of the write protected files. You should trigger a new build to re-generate the generated/ folder – 7ochem Jan 4 '18 at 12:35
2

Magento Cloud Enterprise files are locked within a read-only filesystem, with the exception of several files that should be writable by Magento 2 at runtime (logs, error reports, caches [if not in Redis]).

Also the generated/ folder and the pub/static/ folder and their content are fully write protected. Your website should run in production mode and all generated code and assets should not change in between builds.

The only way to re-generate (and thus clear) what's in the generated/ folder is to trigger a new build which will compile the files (running setup:di:compile).

  • We actually, tried this, but it seems not to be working :( – Richard Valsalan Jan 8 '18 at 10:23
  • How did you trigger it to build? – 7ochem Jan 8 '18 at 14:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.