ScandiPWA (deprecated)
User ManualGitHubSlack
  • ScandiPWA (deprecated)
  • React & PWA for dummies
    • Setting Up Environment and Talking Theory
    • Learning React Hands-on
    • Styling It
    • Learning ScandiPWA Way
  • START & UPGRADE
    • Linux Docker setup
    • Mac Docker setup
    • Setting up the theme with remote M2 server
    • Theme Upgrade to the latest version
    • Automated setup (BETA)
  • A TO Z OVERVIEW
    • Motivation
    • Challenges
    • File structure and UI components
    • Rewriting and Extending A Theme
  • DESCRIPTION OF CONTAINERS
    • Ngrok
  • FAQ
    • Development
    • Installation
    • Billing and license
    • Product support
    • What is PWA?
  • HOW-TO TUTORIALS - INTRODUCTORY
    • Base template
    • Connecting to the GraphQL resolver
    • Extension mechanism
    • Creating GraphQL resolver
    • Debugging and Inspecting
    • Setting Up Frontend
    • File Structure
    • Data Flow
    • Technology Stack
    • Changing environment
    • Theme Build and Configuration
    • Implementing Caching for New Caching Identities
    • Implementing a parent theme
  • HOW-TO TUTORIALS - INTERMEDIATE
    • Debugging in Chrome
    • Configuring XDebug
    • CLI in Docker
    • Postman & GraphQL Playground
    • VSCode Extensions
    • Plugins: implementing
    • Plugins: using and publishing
    • ESlint & StyleLint
    • How To Contribute
    • Migrating to a Newer Version
    • Installation on Existing Magento 2 Sever
    • BEM and Coding Standards
    • Tools of ScandiPWA
    • React Best Practices
  • FAQ
    • Untitled
Powered by GitBook
On this page
  1. HOW-TO TUTORIALS - INTERMEDIATE

Migrating to a Newer Version

PreviousHow To ContributeNextInstallation on Existing Magento 2 Sever

Last updated 4 years ago

We’ll look at a situation where you’ve already developed your theme on ScandiPWA, and you’re looking to update to a newer version.

Go to the . In order to be notified of the latest and/or updates make sure you’re watching the repository or chosen ‘Releases only’.

Here you can see all of the minor and major releases and their features. If there are any, pay attention to the ‘Important notes’ section.

If, for example, you need to add new dependencies to the project you need to go to pwa/package.json and check if the depencency and the version number is added there.

If the depencency is not present in your package.json file, go to scandipwa-base folder and run:

dcf exec frontend bash

After this, run the following command that’ll install the dependencies.

npm run <package-name>

If you need to install a specific version of a package you can use:

npm install <package>@<version>

If you need to adapt to changes in webpack production and development configs and update your files, do the following:

  • Open up the release

  • Click compare, select the version you have and click on tab ‘Files changed’

  • After this you can just ctrl + F the files you specifically need, look at the changes and copy-paste into your config files.

These are the basic principles for ensuring that the update will go smoothly.

Updating the Scandipwa

You need to run the update through composer, since ScandiPWA is a composer app.

// starts the app and opens bash
inapp bash

// updates the whole ScandiPWA package list
composer update scandipwa/* 

// updates Magento database schema and data
magento setup:upgrade

After this, you’ll see changes in the composer.lock file. Make sure to commit these changes in order for them to be present throughout your deployments.

Note:

Don’t forget to flush the Varnish cache

Run the following commands. If you need a refresher on aliases, go .

In order for the changes to take place you can use the command if you’re using Docker, or go to your theme’s directory in app and run npm ci and npm run build.

npm run build will build the application from the source and create a Magento_Theme folder. You can read more about npm run build .

You can read about how to make Magento do it and read the Varnish documentation .

here
docker restart
here
here
here
ScandiPWA GitHub repository
releases
how to upgrade to a new version