Answers.Body: <p>You'll have to change your dependency on <code>craftcms/generator</code> in your <code>composer.json</code> file to this (it's likely in the <code>require-dev</code> section):</p>
  <pre class="lang-json prettyprint-override"><code>&quot;craftcms/generator&quot;: &quot;^2.0.0&quot;
  </code></pre>
  <p>Alternatively, if you don't actually use <a href="https://github.com/craftcms/generator" rel="nofollow noreferrer">Craft Generator</a>, you can remove the dependency altogether.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-03-12T13:31:17.467Z
Answers.Text: Thank you. That worked exactly as it should and I was able to complete the upgrade to version 5.x-beta.
Answers.UserDisplayName: flip
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-03-12T09:53:56.120Z
Answers.LastActivityDate: 2024-03-12T09:53:56.120Z
Answers.UserDisplayName: Mats Mikkel Rummelhoff
Answers.Body: <p>For me, it looks like ... you have to uninstall the generator plugin at first?</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-03-12T13:33:12.587Z
Answers.Text: I didn't want to delete it because it was delivered out-of-the box with Craft CMS. Requiring another version for the generator solved my issue.
Answers.UserDisplayName: flip
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-03-12T09:12:34.350Z
Answers.LastActivityDate: 2024-03-12T09:12:34.350Z
Answers.UserDisplayName: Marc 
Body: <p>I followed the <a href="https://craftcms.com/docs/5.x/upgrade.html" rel="nofollow noreferrer">upgrade instructions</a>. My current version is 4.8.1. When I run <code>composer update</code>, I get the following error:
  <a href="https://i.sstatic.net/nGZZT.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/nGZZT.png" alt="enter image description here" /></a></p>
  <p>I added the following code to composer.json because of another issue:</p>
  <pre><code>  &quot;minimum-stability&quot;: &quot;dev&quot;,
    &quot;prefer-stable&quot;: true,
  </code></pre>
  <p>How can I solve the error message to upgrade to 5.x?</p>
  
Tags: <updates><upgrades><craft5>
Title: Upgrade to 5.x failed
ThreadText: # Upgrade to 5.x failed
  
  (Asked by: username_0 on 2024-03-12)
  
  I followed the [upgrade instructions](https://craftcms.com/docs/5.x/upgrade.html). My current version is 4.8.1. When I run `composer update`, I get the following error:
  [![enter image description here](https://i.sstatic.net/nGZZT.png)](https://i.sstatic.net/nGZZT.png)
  
  I added the following code to composer.json because of another issue:
  
  ```
    "minimum-stability": "dev",
    "prefer-stable": true,
  
  ```
  
  How can I solve the error message to upgrade to 5.x?
  
  **Tags:** updates, upgrades, craft5
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2024-03-12. Score: 2 | Accepted answer
  
  You'll have to change your dependency on `craftcms/generator` in your `composer.json` file to this (it's likely in the `require-dev` section):
  
  ```json
  "craftcms/generator": "^2.0.0"
  
  ```
  
  Alternatively, if you don't actually use [Craft Generator](https://github.com/craftcms/generator), you can remove the dependency altogether.
  
  > **Comments:**
  > **username_0**: Thank you. That worked exactly as it should and I was able to complete the upgrade to version 5.x-beta.  
  
  ---
  
  ### Answer by username_2 on 2024-03-12. Score: 0
  
  For me, it looks like ... you have to uninstall the generator plugin at first?
  
  > **Comments:**
  > **username_0**: I didn't want to delete it because it was delivered out-of-the box with Craft CMS. Requiring another version for the generator solved my issue.  
  
  ---
  
  