5

I recently started learning Nuxt.Js and faced with the problem of deployment on GitHub Pages.

I do everything according to the instructions:

https://medium.com/@kozyreva.hanna/nuxt-js-gh-pages-deployment-73b88aa3aa65

Infinite nuxt-loading appears on gh-pages instead of content.

GitHub: https://github.com/Owe7x/slide

GH-pages: https://owe7x.github.io/slide/

What could be the problem?

1 Answer 1

7

I've already tried to follow that steps and they didn't work for me, after some researches I ended up with following steps :

  1. remove the dist entry from .gitignore file
  2. run npm run generate
  3. run git add . then git commit -m "deploy on gh-pages"
  4. We need to add router base configuration in nuxt.config.js:
      target: 'static',
      router: {
        base: '/<repository-name>/'
      }
  1. run git subtree push --prefix dist origin gh-pages

Make sure to delete the current gh-pages branch before running these commands.

Sign up to request clarification or add additional context in comments.

5 Comments

Thanks a lot) Only now there is a problem with the paths "Failed to load resource: the server responded with a status of 404 ()"
could you show a screenshot of that error?
after running npm run generate go to dist/index.html and remove the slash / before any source link
mmmm sorry, Try this nuxtjs.org/faq/github-pages

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.