Magento Progressive Web Apps (PWA) Studio is a new project available for Magento Commerce Cloud 2.3.x or later. To be able to use and install PWA studio, you need to set the NPM package manager version to 5.x or later to get support for Node.js 8.x. This is done in the
hooks:build section of the
.magento.app.yaml configuration file.
Environment and technologies
- Magento Commerce Cloud 2.3.X
- Magento PWA Studio
Set NPM version: steps
To set the needed NPM version, specify it in the
.magento.app.yaml configuration file. Follow these steps:
- On your local development environment, locate the
- Open the file for editing using your plain text editor or IDE.
- Set the required version in the
In the following example, the configuration is set to install NPM v9.5.0, the highest available at the moment (February 4, 2019):
hooks: build: | unset NPM_CONFIG_PREFIX curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" nvm install 9.5.0
- Save changes in the file.
- Git push the edited file to your Integration environment.
The changes come into effect after you Git push the updated YAML file to the environment.