1

I was truing to run strapi and react in strapi's public directory concurrently but having problems.

[1] npm ERR! code ELIFECYCLE
[1] npm ERR! errno 1
[1] npm ERR! public@0.1.0 start: `react-scripts start`
[1] npm ERR! Exit status 1
[1] npm ERR!
[1] npm ERR! Failed at the public@0.1.0 start script.
[1] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
[1]
[1] npm ERR! A complete log of this run can be found in:
[1] npm ERR!     C:\Users\---\AppData\Roaming\npm-cache\_logs\2020-07-20T09_22_38_328Z-debug.log
[1] npm ERR! code ELIFECYCLE
[1] npm ERR! errno 1
[1] npm ERR! react-strapi@0.1.0 client: `npm start --prefix public`
[1] npm ERR! Exit status 1
[1] npm ERR!
[1] npm ERR! Failed at the react-strapi@0.1.0 client script.
[1] npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
[1]
[1] npm ERR! A complete log of this run can be found in:
[1] npm ERR!     C:\Users\---\AppData\Roaming\npm-cache\_logs\2020-07-20T09_22_38_408Z-debug.log
Robbi
  • 151
  • 2
  • 6
  • 14

1 Answers1

1

Is your Strapi app and react-app seperate to each other? If so, there shouldn't be an issue with starting your React app that is not related to Strapi, as Strapi should essentially be your backend while your React-app is front-end. Can your React app run separately fine?

yahms23
  • 326
  • 2
  • 11
  • No, I just want to run react and strapi in same terminal with concurrently but not running – Robbi Jul 20 '20 at 13:16
  • You should have them separate, as React app should make calls to your backend Strapi app. If both project are in the same folder that's fine as long as **they are both separated ** into their own folders (client & server) and each run on it's own. You can still run them concurrently; you navigate to Stapi app directory and run it, and in another terminal window run your React App. You could right a script to run them both with one command but the method I'm suggesting should be easier – yahms23 Jul 20 '20 at 13:20
  • Is there other simple alternative frontend for strapi? – Robbi Jul 20 '20 at 16:26
  • Strapi is a headless CMS, so it has a 'frontend' if you like already when you use the package. All Strapi does is manage your content (your BE) in a visually appealing manner; and your separate frontend app (React etc) will receive this data from the backend and display it with your desired format. Here are the [Strapi docs](https://strapi.io/documentation/3.0.0-beta.x/getting-started/quick-start.html#_1-install-strapi-and-create-a-new-project) – yahms23 Jul 21 '20 at 08:05