strapi/docs/3.0.0-beta.x/guides/update-version.md

98 lines
2.4 KiB
Markdown
Raw Normal View History

2019-10-29 20:06:45 +01:00
# Update Strapi version
How to upgrade your application to the latest version of Strapi.
## Upgrading your dependencies
Start by upgrading all your strapi package version.
For example moving from `3.0.0-beta.16` to `3.0.0-beta.17`
2019-11-07 12:05:39 +01:00
:::: tabs
2019-10-29 20:06:45 +01:00
2019-11-07 12:05:39 +01:00
::: tab 3.0.0-beta.16
2019-10-29 20:06:45 +01:00
```json
{
//...
"dependencies": {
"strapi": "3.0.0-beta.16",
"strapi-admin": "3.0.0-beta.16",
"strapi-hook-bookshelf": "3.0.0-beta.16",
"strapi-hook-knex": "3.0.0-beta.16",
"strapi-plugin-content-manager": "3.0.0-beta.16",
"strapi-plugin-content-type-builder": "3.0.0-beta.16",
"strapi-plugin-email": "3.0.0-beta.16",
"strapi-plugin-graphql": "3.0.0-beta.16",
"strapi-plugin-settings-manager": "3.0.0-beta.16",
"strapi-plugin-upload": "3.0.0-beta.16",
"strapi-plugin-users-permissions": "3.0.0-beta.16",
"strapi-utils": "3.0.0-beta.16"
}
}
```
:::
2019-11-07 12:05:39 +01:00
::: tab 3.0.0-beta.17
2019-10-29 20:06:45 +01:00
```json
{
//...
"dependencies": {
"strapi": "3.0.0-beta.17",
"strapi-admin": "3.0.0-beta.17",
"strapi-hook-bookshelf": "3.0.0-beta.17",
"strapi-hook-knex": "3.0.0-beta.17",
"strapi-plugin-content-manager": "3.0.0-beta.17",
"strapi-plugin-content-type-builder": "3.0.0-beta.17",
"strapi-plugin-email": "3.0.0-beta.17",
"strapi-plugin-graphql": "3.0.0-beta.17",
"strapi-plugin-settings-manager": "3.0.0-beta.17",
"strapi-plugin-upload": "3.0.0-beta.17",
"strapi-plugin-users-permissions": "3.0.0-beta.17",
"strapi-utils": "3.0.0-beta.17"
}
}
```
:::
::::
Then run either `yarn install` or `npm install` to install the specified version.
2019-11-07 12:05:39 +01:00
::: tip
2020-03-22 13:28:03 -04:00
If the operation doesn't work, you should probably remove your `yarn.lock` or `package-lock.json`. If it still does not work, let's run the hard mode `rm -Rf node_modules`
2019-10-29 21:05:45 +01:00
:::
2019-10-29 20:06:45 +01:00
## Building your administration panel
2020-03-22 13:28:03 -04:00
New releases can introduce changes to the administration panel that require a rebuild.
2019-10-29 20:06:45 +01:00
Start by deleting your current build:
```bash
2019-10-29 21:05:45 +01:00
rm -rf build
2019-10-29 20:06:45 +01:00
```
Build the administration panel:
```bash
yarn build
# or
npm run build
```
2019-11-07 12:05:39 +01:00
::: tip
2019-10-29 21:05:45 +01:00
If the operation doesn't work, you should probably remove the `.cache` folder too.
:::
2019-10-29 20:06:45 +01:00
## Migration guides
Sometimes Strapi introduces changes that need more than just the previous updates.
2020-03-22 13:28:03 -04:00
That is the reason for the [Migration Guide](../migration-guide/README.md) page.
2019-10-29 20:06:45 +01:00
2020-03-22 13:28:03 -04:00
Just make sure when you update your version that a migration guide exists or not.