Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I upgrade my Strapi version to v4.10.5? #17

Closed
code-savior opened this issue May 12, 2023 · 2 comments
Closed

How can I upgrade my Strapi version to v4.10.5? #17

code-savior opened this issue May 12, 2023 · 2 comments

Comments

@code-savior
Copy link

code-savior commented May 12, 2023

When I directly modify the version in package.json and run npm install again, it throws an error.

npm ERR! code ERESOLVE
npm ERR! ERESOLVE unable to resolve dependency tree
npm ERR!
npm ERR! While resolving: corporate-blog-template@0.1.0
npm ERR! Found: @strapi/strapi@undefined
npm ERR! node_modules/@strapi/strapi
npm ERR! @strapi/strapi@"4.10.5" from the root project
npm ERR!
npm ERR! Could not resolve dependency:
npm ERR! peer @strapi/strapi@"^4.0.0" from @strapi/plugin-seo@1.8.0
npm ERR! node_modules/@strapi/plugin-seo
npm ERR! @strapi/plugin-seo@"^1.8.0" from the root project
npm ERR!
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.

@PaulBratslavsky
Copy link
Contributor

PaulBratslavsky commented May 22, 2023

@code-savior

I was able to upgrade no issue. Which node version were you using.

I am using v18.14.2 here is a video of my upgrade steps.

strapi-update.mp4

Updating Your Strapi Project

Navigate to your backend/package.json file.

 "dependencies": {
    "@strapi/plugin-i18n": "4.9.2",
    "@strapi/plugin-seo": "^1.8.0",
    "@strapi/plugin-users-permissions": "4.9.2",
    "@strapi/strapi": "4.9.2",
    "better-sqlite3": "7.4.6"
  },

You can see my current project dependencies. I am going to replace my Strapi version from 4.9.2 to 4.10.5

 "dependencies": {
    "@strapi/plugin-i18n": "4.10.5",
    "@strapi/plugin-seo": "^1.8.0",
    "@strapi/plugin-users-permissions": "4.10.5",
    "@strapi/strapi": "4.10.5",
    "better-sqlite3": "7.4.6"
  },

note: if you are using additional external packages or plugins, check and update accordingly.

Once you make the changes in your package.json file run the following commands for clean update.

Make sure you are in the correct folder. I am in the backend folder of my project. This is where you will find your Strapi code.

rm -rf node_modules
rm yarn.lock
yarn
yarn build && yarn develop

Once you check that everything is running correctly push all your recent changes to github.

@PaulBratslavsky
Copy link
Contributor

@code-savior I hope this helped, I will be closing this issue, but if you have any additional questions let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants