Question

App Platform Bug —

Posted May 23, 2021 256 views
ReactDigitalOcean App Platform

Not sure this is the right place but it seems there’s a bug on App Platform. I’m building an Ionic / React / TS static app which’s served through an index.html in a standard output directory.

I started this error a few days ago

[bloodbath-app] [2021-05-23T05:49:53.564086557Z] /workspace/src/App.tsx
[bloodbath-app] [2021-05-23T05:49:53.564121154Z] TypeScript error in /workspace/src/App.tsx(1,10):
[bloodbath-app] [2021-05-23T05:49:53.564130346Z] Module '"react-router-dom"' has no exported member 'Redirect'.  TS2305
[bloodbath-app] [2021-05-23T05:49:53.564136844Z] 
[bloodbath-app] [2021-05-23T05:49:53.564142210Z]   > 1 | import { Redirect, Route } from 'react-router-dom';
[bloodbath-app] [2021-05-23T05:49:53.564148371Z]       |          ^
[bloodbath-app] [2021-05-23T05:49:53.564152584Z]     2 | import {
[bloodbath-app] [2021-05-23T05:49:53.564158095Z]     3 |   IonApp,
[bloodbath-app] [2021-05-23T05:49:53.564162893Z]     4 |   IonIcon,
[bloodbath-app] [2021-05-23T05:49:53.564167042Z] 
[bloodbath-app] [2021-05-23T05:49:53.565237923Z] 
[bloodbath-app] [2021-05-23T05:49:53.630227668Z] [ERROR] An error occurred while running subprocess react-scripts.
[bloodbath-app] [2021-05-23T05:49:53.630282601Z]         
[bloodbath-app] [2021-05-23T05:49:53.630291006Z]         react-scripts build exited with exit code 1.
[bloodbath-app] [2021-05-23T05:49:53.630300570Z]         
[bloodbath-app] [2021-05-23T05:49:53.630306077Z]         Re-running this command with the --verbose flag may provide more information.
[bloodbath-app] [2021-05-23T05:49:53.707686553Z] building: exit status 1
[bloodbath-app] [2021-05-23T05:49:53.714180092Z] ERROR: failed to build: exit status 1
[bloodbath-app] [2021-05-23T05:50:16.040777703Z] 
[bloodbath-app] [2021-05-23T05:50:16.040883565Z] For documentation on the buildpacks used to build your app, please see:
[bloodbath-app] [2021-05-23T05:50:16.041024480Z]    Node.js: https://do.co/apps-buildpack-node
[bloodbath-app] [2021-05-23T05:50:16.044714654Z] 

I figured there was a problem in my code or a difference between my development environment and DigitalOcean, so I put a specific node / react-router-dom version and made sure it’s the same on both.

It “worked” and I could compile and deploy my app. But then today I made a minor change which has nothing to do with those files on the same app (a simple tag change in a file of the app) and it broke again with this error.

Because my changes were absolutely not related, I believe I’m facing a bug. Did it happen to someone else? Is it a bug?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

×
Submit an Answer
2 answers

Hello @bonjour499858

There is no bug that has been reported for this error in the App Platform. I did some basic search for this error and found that this error is thrown by the package @types/react-router-dom. Some users resolved it by running the following command:

npm i --save-dev @types/react-router-dom 

Click here for more info

If the issue persists then please report this error to the support team so that we can look into it further.

Best,
Dikshith

I’d think that this has nothing to do with the APP platform, it only serves the javascript code you deploy as a static asset, if it works on your local and does not work on the APP platform, then something is wrong with your production build.