DEV Community

Cover image for what I learnt this week
Ifeanyi Chima
Ifeanyi Chima

Posted on • Edited on

what I learnt this week

BMC

"Page Not Found" when trying to access a site deployed on Netlify

I ran into this issue, when I refresh my web app that is deployed on Netlify,

Page Not found

Looks like you've followed a broken link or entered a URL that doesn't exist on >this site.

← Back to our site

I found a solution to the problem on stackoverflow

Solution

In your public folder (folder which contains index.html) create a file called _redirects with no extension. Then, type the following inside it:

/* /index.html 200

Now save, commit, push and publish. :)

Reason for "Not Found" is because, when using router eg: React Router it handles all the routes but when you directly goto an endpoint, netlify must know where to redirect you. That is what we are specifying in the _redirects file.

I like this blog

How to put data from RTK query into state slice in Redux toolkit

Someone asked the question How to put data from RTK query into redux slice

I found an answer here on a dev blog

How to fix failed to push some refs to gitlab?

I ran into this issue, when I tried to push my project to gitlab.

error: failed to push some refs to 'https://gitlab.com/
Enter fullscreen mode Exit fullscreen mode

I found a solution

first step: I ran git pull

second step: I ran

git pull --rebase origin [branch]
Enter fullscreen mode Exit fullscreen mode

Buy Me A Coffee

Thank You, Please follow me

HTML GitHub

Image of Datadog

The Essential Toolkit for Front-end Developers

Take a user-centric approach to front-end monitoring that evolves alongside increasingly complex frameworks and single-page applications.

Get The Kit

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay