I made an app using Ionic, Capacitor, and Nextjs. I want to use Live Update via Appflow, which requires react-scripts build
. Can’t I use this with nextjs? Please let me know if there is a way to do ionic deploy add
without react-scripts.
I wrote detail issue in nextjs + ionic + capacitor example repository what I referred.
opened 07:23AM - 10 Aug 21 UTC
Thanks for the good example. Both Ionic and Capacitor are great products.
But … I'm having trouble integrating it with Appflow. When installing Appflow SDK, `react-scripts build` is required, but it is not compatible with nextjs environment. Please let me know if there is any way. Can't I use nextjs and Appflow together?
Installation Appflow SDK : https://ionic.io/docs/appflow/quickstart/installation
Here's what I tried.
```
$ ionic deploy add \
--app-id="APPFLOW_APP_ID" \
--channel-name="Production" \
--update-method="auto"
[WARN] Live Updates plugin already added. Reconfiguring only.
> ionic deploy manifest
[OK] Appflow Deploy manifest written to ./build/pro-manifest.json!
> ionic capacitor sync
> react-scripts build
[INFO] Looks like react-scripts isn't installed in this project.
This package is required for this command to work properly.
? Install react-scripts? No
[WARN] Not installing--here's how to install manually: npm i -D -E react-scripts
[ERROR] react-scripts is required for this command to work properly.
```
When react-scripts is installed, files not used by nextjs such as index.html are required.