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>
- Make sure you have an NPM token generated in My Account / NPM Auth tokens section of the marketplace
- Find the package name matching your theme in My Account / NPM packages section of the marketplace
- Create the .npmrc file with the following contents, inside of your ScandiPWA root folder:
- Copy the NPM auth token, and replace the <NPM_AUTH_TOKEN> template in .npmrc with your NPM token
- 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>
- Change the scandipwa.parentTheme field in ScandiPWA root package.json to be equal to theme’s package name, for example, @scandiweb/my-theme
- 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>