Step 1: Set Up Your Theme /themes/custom/my_react_theme
Step 2: Initialize Node.js: In your theme's root directory, run npm init -y to create a package.json file.

Step4 : add the build scripts. locate the "scripts" section. Add the "build" and "dev" entries as shown below