Search code examples
javascripttypescriptcreate-react-appnetlify

How to deploy create-react-app with typescript to Netlify when page returns 404


My Netlify hosted app keeps returning a 404 "Page Not Found". I've ran things as simply as I can:


Solution

  • Finally got it working by changing my deploy settings. I changed:

    Build command: CI= yarn run build

    Publish directory: ./build

    (I get this error in the deploy log: 10:30:26 AM: Different publish path detected, going to use the one specified in the Netlify configuration file: 'build' versus './build' in the Netlify UI

    Which begs the question "why didn't you just work before if it was already in the netlify configuration file?")