1

我正在尝试同时运行strapi并在strapi的公共目录中做出反应,但遇到了问题。

[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
4

1 回答 1

1

您的 Strapi 应用程序和 react-app 是相互独立的吗?如果是这样,那么启动与 Strapi 无关的 React 应用程序应该没有问题因为 Strapi 本质上应该是您的后端,而您的 React-app 是前端。你的 React 应用程序可以单独运行吗?

于 2020-07-20T11:10:47.460 回答