Can't access my netlify site / netlify site won't load

so change yarn build to npm run build?

yep! try that and then let me know what happens. check your deploy log, and if it gives you an error, please post the full deploy log here too.

didn’t work :sob: , no error. it says page not found. here is the log:

7:09:17 PM: [WARNING] We are experiencing internal issues storing deploy logs. Some log lines may be missing.
7:09:17 PM: Build ready to start
7:09:22 PM: build-image version: 2dbd444fcdce00cf06325060a8238d5ae3e86774
7:09:22 PM: build-image tag: v3.3.7
7:09:22 PM: buildbot version: 10926ec3478dd6c0bfc84e15d24de329bb1b357f
7:09:22 PM: Fetching cached dependencies
7:09:22 PM: Starting to download cache of 129.9MB
7:09:25 PM: Finished downloading cache in 2.878083627s
7:09:25 PM: Starting to extract cache
7:09:31 PM: Finished extracting cache in 6.150566899s
7:09:31 PM: Finished fetching cache in 9.069936549s
7:09:31 PM: Starting to prepare the repo for build
7:09:32 PM: Preparing Git Reference refs/heads/master
7:09:32 PM: Starting build script
7:09:32 PM: Installing dependencies
7:09:33 PM: Started restoring cached node version
7:09:36 PM: Finished restoring cached node version
7:09:37 PM: v10.19.0 is already installed.
7:09:38 PM: Now using node v10.19.0 (npm v6.13.4)
7:09:38 PM: Attempting ruby version 2.6.2, read from environment
7:09:40 PM: Using ruby version 2.6.2
7:09:40 PM: Using PHP version 5.6
7:09:40 PM: Started restoring cached node modules
7:09:40 PM: Finished restoring cached node modules
7:09:40 PM: Started restoring cached yarn cache
7:09:40 PM: Finished restoring cached yarn cache
7:09:41 PM: Installing NPM modules using Yarn version 1.17.0
7:09:41 PM: yarn install v1.17.0
7:09:42 PM: [1/4] Resolving packages...
7:09:42 PM: success Already up-to-date.
7:09:42 PM: Done in 0.75s.
7:09:42 PM: NPM modules installed using Yarn
7:09:42 PM: Started restoring cached go cache
7:09:42 PM: Finished restoring cached go cache
7:09:42 PM: unset GOOS;
7:09:42 PM: unset GOARCH;
7:09:42 PM: export GOROOT='/opt/buildhome/.gimme/versions/go1.12.linux.amd64';
7:09:42 PM: export PATH="/opt/buildhome/.gimme/versions/go1.12.linux.amd64/bin:${PATH}";
7:09:42 PM: go version >&2;
7:09:42 PM: export GIMME_ENV='/opt/buildhome/.gimme/env/go1.12.linux.amd64.env';
7:09:42 PM: go version go1.12 linux/amd64
7:09:42 PM: Installing missing commands
7:09:42 PM: Verify run directory
7:09:43 PM: Executing user command: npm run build
7:09:43 PM: > front-end@0.1.0 build /opt/build/repo
7:09:43 PM: > react-scripts build
7:09:45 PM: Creating an optimized production build...
7:10:05 PM: Compiled with warnings.
7:10:05 PM: ./src/components/Projects.js
7:10:05 PM:   Line 3:  'Button' is defined but never used  no-unused-vars
7:10:05 PM: Search for the keywords to learn more about each warning.
7:10:05 PM: To ignore, add // eslint-disable-next-line to the line before.
7:10:05 PM: File sizes after gzip:
7:10:05 PM:   224.26 KB  build/static/js/main.943edfe0.js
7:10:05 PM:   528 B      build/static/css/main.2e849cee.css
7:10:05 PM: The project was built assuming it is hosted at the server root.
7:10:05 PM: You can control this with the homepage field in your package.json.
7:10:05 PM: For example, add this to build it for GitHub Pages:
7:10:05 PM:   "homepage" : "http://myname.github.io/myapp",
7:10:05 PM: The build folder is ready to be deployed.
7:10:05 PM: You may serve it with a static server:
7:10:05 PM:   yarn global add serve
7:10:05 PM:   serve -s build
7:10:05 PM: Find out more about deployment here:
7:10:05 PM:   http://bit.ly/2vY88Kr
7:10:05 PM: Skipping functions preparation step: no functions directory set
7:10:05 PM: Caching artifacts
7:10:05 PM: Started saving node modules
7:10:05 PM: Finished saving node modules
7:10:05 PM: Started saving yarn cache
7:10:05 PM: Finished saving yarn cache
7:10:05 PM: Started saving pip cache
7:10:05 PM: Finished saving pip cache
7:10:05 PM: Started saving emacs cask dependencies
7:10:05 PM: Finished saving emacs cask dependencies
7:10:05 PM: Started saving maven dependencies
7:10:05 PM: Finished saving maven dependencies
7:10:05 PM: Started saving boot dependencies
7:10:05 PM: Finished saving boot dependencies
7:10:05 PM: Started saving go dependencies
7:10:05 PM: Finished saving go dependencies
7:10:05 PM: Build script success
7:10:05 PM: Starting to deploy site from ''
7:10:05 PM: Creating deploy tree 
7:10:05 PM: Creating deploy upload records
7:10:06 PM: 0 new files to upload
7:10:06 PM: 0 new functions to upload
7:10:06 PM: Starting post processing
7:10:06 PM: Post processing done
7:10:06 PM: Site is live
7:10:29 PM: Finished processing build request in 1m7.09749249s

a ha! this is actually not a bad thing.

I think we are actually making progress. We may still need to tweak things a little bit. Let’s keep trying!

Give this a read through - we may have the wrong directory settings to show the deployed site correctly BUT i think that npm run build is indeed the correct command to deal with the error you had earlier.

I have the index.html file and I have tried build, public, and src all to no avail. :sob:

ok. I still feel we are close to getting this working.

go ahead and follow the instructions here to download the site:

and then please post a screenshot showing your directory structure, so we can figure out exactly what is generated and why, so we can point the paths to the index.html.

looks like your publish directory should just be blank, can you try that and see if that makes the index.html show up?

still gave page not found

I’m not sure why exactly but it was react-router-dom. I had to change my app.js code to mostly match this: https://reacttraining.com/react-router/web/example/basic

then change my publish directory to /build.

2 Likes

oh my goodness - after all that troubleshooting and then you figured it out yourself! :tada: :tada: :tada:

1 Like

Thank you! To be honest though, you taught me a lot about how netlify works and the production build process. Thank-you so much for your help!

3 Likes

awesome. i’m glad that was helpful!!

2 Likes

I know this is resolved now, but just for the record, yarn build works fine too. You can use either Yarn or npm with Create React App :slight_smile:

Hey Perry,

I’ve just finished my first draft version of my Rmarkdown website where I used the Distill package in RStudio to create my website. I used Netlify to publish via GitHub. Is there a reason my site on page EDA is not working or not loading because the rest of the website pages works fine. Here is my website https://eragroforestry.netlify.app and this one has problems https://eragroforestry.netlify.app/eda

Hi @kamaulindhardt,

Have you checked the console?

There appears to be some errors which might be causing this.

1 Like

Hi @hrishikesh ,

Thank you for responding to my issue. I see :thinking: I am very new to the whole GitHub – Netlify deployment things… Could you elaborate a bit on how I can get a closer look at these errors? Which console?

All the best,
Kamau!

It’s the browser’s console, or developer tools/inspect element - whatever you’d call it. The errors reported there are usually thrown by the client-side JavaScript, however it might include some network errors like 404s too.

Alright Thanks!

Indeed I found this in Safari –> Develop –> Show JavaScript Console. Now could you maybe please tell me what I can do to get a better understanding of the errors and potentially fix the issues? By now I kinda get that the issue is not with Netlify but rather with the development of my site, right?

So, the home page is just showing some 404 errors for JS Source Maps - you could ignore those as it’s not going to cause any issues with the website.

However, if you go to the page that you say is not working, you’d see the errors I posted in my screenshot.

The way the console works is, it will show the error text and to the right, it shows the source of that error. In your case, the first error is being thrown by the eda page itself. If you click on that text to the right, you’d directly jump to the line that threw the error. From there, you’d have to figure out why your code won’t work.

For example, the second error in my screenshot above says it’s a JSON Parse error which would tell me that there’s something wrong with the JSON you’re asking your JavaScript to parse using JSON.parse(). When I click on that line to take me to the error, it says unexpected end-of-file. Double-check the JSON that you’re trying to parse.

Side note: The page eda weighs over 10 MB! This is going to affect the performance badly and you can see, the page loads very slowly. Not to mention, you’re losing 10 MB bandwidth for each page load.

1 Like