'Installing ScandiPWA to Existing Magento 2 setup

I am trying to ScndiPWA on Magento 2.4.2 but face up next error message:

sysadmin@DEV-Magento:/var/www/magento2$ sudo composer require scandipwa/spwa-app
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Continue as root/super user [yes]? y
Using version ^0.0.1 for scandipwa/spwa-app
./composer.json has been updated
Running composer update scandipwa/spwa-app
Loading composer repositories with package information
yIn Laminas\DependencyPlugin\DependencyRewriterV2::onPrePoolCreate
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

 Problem 1
  - scandipwa/performance 1.4.3 requires magento/module-inventory-api * -> could not be found in any version, there may be a typo in the package name.
  - scandipwa/spwa-app 0.0.1 requires scandipwa/performance ^1.4.3 -> satisfiable by scandipwa/performance[1.4.3].
  - Root composer.json requires scandipwa/spwa-app ^0.0.1 -> satisfiable by scandipwa/spwa-app[0.0.1].

Potential causes:
 - A typo in the package name
 - The package is not available in a stable-enough version according to your minimum-stability 
 setting
 see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.
 - It's a private package and you forgot to add a custom repository to find it

Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.

First of all Magento works fine. But it seems magento/module-inventory-api is not installed or maybe it installed but not supported version by ScandiPWA? How can I check the version of magento/module-inventory-api?

Thank you!



Solution 1:[1]

Inorder to install scandipwa with your existing Magento site please follow below steps get into magento root directory and execute commands 1 by 1

  1.mkdir src/localmodules
  2.cd src/localmodules
  3.yarn create scandipwa-app your-application-name-pwa
  4.cd your-application-name-pwa
  5.BUILD_MODE=magento npm run build
  6.now come out side to magento root directory
  7.composer config repo.theme path localmodules/your-application-name-pwa
  8.composer require scandipwa/your-application-name-pwa
  9.php bin/magento setup:upgrade
 10.php bin/magento cache:disable full_page
 11. Login to Magento admin panel and switch the theme into(your-application-name-pwa) and follow scandipwa docs https://docs.scandipwa.com/getting-started-1/magento-integration

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Ishak Ali