DEV Community

Discussion on: Deploy / Host your React App with cPanel in Under 5 Minutes

Collapse
 
musicdsign profile image
David Silberman

This was a fantastic tutorial. It worked perfect, except for one caveat. In step 3. Create the build File, the command "npm build" didn't work. I got the following:
npm build called with no arguments. Did you mean to npm run-script build?
So I changed it to "npm run build" and it worked fine!

I also used Filezilla to transfer the contents of the build folder into a sub-folder of my public_html directory, because I have a number of sub-domain folders in my public_html directory. Once I refreshed my browser, the domain showed up perfectly with my React application all intact!

Collapse
 
ritviksharma3 profile image
ritviksharma3

try "npm run build"