After trying many different things, my deploy preview is still compiling into a blank page. I’m able to successfully deploy from GitHub to production, but not to deploy preview.
Because of chunking, the main chunk (https://www.datastrategypros.com/static/js/main.493da4ce.chunk.js) is returning a 404 because it only exists on the preview URL.
I guess finding out why scripts are loading from www.datastrategypros.com instead of from a path on preview domain e.g./static/js/main.493da4ce.chunk.js.
There is, I would suggest, something in the site configuration that is setting that base URL.
I’ve been looking into this and I still don’t get it. Not sure what setting I would edit to ensure deploys build correctly. There isn’t a “homepage” property in my json (there used to be, but I removed it), and that didn’t fix. Not sure what to change without taking down my site in prod.
I’m posting all the relevant links here so they’re in one place in case anyone the Netlify Pilot team is interested in saying something helpful about this:
Note that there is no “homepage” property in my package.json, so an incorrect value here must not be my problem. I think there’s something in my Netlify settings that’s messed up (maybe even some property that I don’t have access to as a frontend user of the site), and I would like someone from Netlify to help or at least confirm this is not the case.
I checked that page, and @coelmay’s initial assertion seems to be correct. The files are not loading because they’re referencing the production URL.
Now, as the homepage doesn’t exist in the package.json, does it exist in your .env file by any chance? I checked your entire repo and it doesn’t seem to exist anywhere else that would be a problem.
The other problem is that, you’ve committed the build folder to your repository. That folder includes the files from your previous build in which this problem existed. I tried building your site locally, and all the paths were relative (started with /) - so there does seem to be something wrong with the files that you didn’t upload in the public repo OR the fact that the build folder exists in the repo.