How to install a ScandiPWA Theme via NPM

<aside> ➡️ This is the recommended way of theme installation. This type of installation prohibits you to modify package source, and enables upgrades via NPM.

</aside>

  1. Make sure you have an NPM token generated in My Account / NPM Auth tokens section of the marketplace
  2. Find the package name matching your theme in My Account / NPM packages section of the marketplace
  3. Create the .npmrc file with the following contents, inside of your ScandiPWA root folder:
  4. Copy the NPM auth token, and replace the <NPM_AUTH_TOKEN> template in .npmrc with your NPM token
  5. Add the themes package to your project's dependencies, use one of the commands: a. You can use Yarn: yarn add <PACKAGE> b. Or use NPM: npm i <PACKAGE>
  6. Change the scandipwa.parentTheme field in ScandiPWA root package.json to be equal to theme’s package name, for example, @scandiweb/my-theme
  7. Run your theme as usual, it should start and have a new desired appearance of your new theme.

<aside> ➡️ To install a ScandiPWA theme via ZIP, follow this tutorial: How to install a theme from ZIP?

</aside>