I'm trying to add a vuejs project built using webpack in gituhub pages. I have created a repository.
renamed dist folder as a doc folder.
changed the settings-> github pages-> source to master-branch docs folder
this is the docs folder
Everything has done properly, the project is working fine when I'm running it in dev server. but when I pushed in github pages it is not working at all.
When I opened the link of the repository page i'm getting a blank window. I checked in the browser console.
I'm getting this error in browser:
.
Please find a solution for this please. More vue projects are there to upload and i'm unable to upload one at least.
Related
I deployed my React Three.js with Vite app in Github pages, and I can't get it running on a live server - https://thehero9.github.io/ThreeJsReactFiber/
This here is the code in my repo - https://github.com/TheHero9/ThreeJsReactFiber
I have no trouble with the app locally, you can try cloning it with git, then run:
npm install
npm run dev
In order to check how it works locally.
I think the .gltf files are not being loaded correctly due to a problem with the file paths or the loading code. Please, can you help us and check whether you can find why the .gltf files are not loading?
Errors:
Everything is loaded properly on a local server:
[3]: https://i.stack.imgur.com/xV31l.jpg
When trying to host my webpage with a three.js background, everything loads properly when hosted locally but as soon as I push it up to github pages nothing loads - just html.
I am using vite to package my code, and gh-pages to deploy the 'dist' folder to the hosted branch. I have tried changing the urls of all images and assets to '/image' and storing the images in a public folder inside the root folder, as vite recommends. I run
$ npm run build, and
$ npm run preview
and everything looks good. I run npm run deploy (I added a deploy script in package.json, deploy: 'gh-pages -d dist'), and then host the gh-pages branch on github pages and only the html shows up, and the console shows multiple 404: file not found errors.
Repo
The hosted code is on the gh-pages branch, if that hasn't been clear already.
The url to your JS and CSS files is wrong.
Your github page is trying to load the the JS from https://talmage89.github.io/assets/index.2e5bc2a5.js...
But it should be:
https://talmage89.github.io/ThreeJSDemo2/assets/index.2e5bc2a5.js.
The Vite documentation hss specific instructions for setting the base when hosting on Github Pages
Hello guys so as you can see from the title this is my first time working on a project. I’m using Vue, so when I deploy after running the “npm run build” and uploading the index.html.
Where does the assets folder go, I have a lot of images in it and I’m referencing them in my project. Does any of this change after deployment?
So I made a Typescript project with Visual Studio. It works fine when I launch it with Visual Studio, but if I try to push it to my GitHub Pages site, it will put the index.html in a subfolder and I get a 404 error when I try to load my website. Even if I try to reference the index.html in the website url it doesn't really work.
I was wondering if it's possible to only publish the needed items. I think I would only need the subfolder. Correct me if I am wrong though.
Note: I have the GitHub extension for Visual Studio installed.
UPDATE:
Since some of the links don't seem to work anymore I think I should give some extra information. So basically you need to have a branch named gh-pages. On that branch you need to have an index.html file in your root folder. Then the index.html file should be visible on the github page URL.
You need to push a branch named gh-pages in order to view it as a website.
Create a new branch and then move the file into the root folder of the branch, upload it to the gh-pages and you set to go.
Check this out:
https://github.com/nirgeier/JimVliet.github.io/tree/gh-pages
This is how your file should be inside your root folder.
I am working on an Angular project and wanted to host the project through GitHub with gh-pages.
Since the index.html file was not in the root directory, I created an empty branch off of my master and called it gh-pages. I then copied my files into the new branch, so that the index.html file was in the root directory.
I am also using Grunt, so I copied the grunt generated app.js file into the root directory as well. I can now see the project in the browser if I go to http://kelseysteele.github.io/votm3/#/home, however the navigation bar is missing and the other pages, like http://kelseysteele.github.io/votm3/#/overview, are not working properly.
I've been stuck on this for a few days and would really appreciate any assistance with this.
Check your console, you'll see errors: GET http://kelseysteele.github.io/data/overview-data.json 404 (Not Found)
Fix the url here: https://github.com/KelseySteele/votm3/blob/master/src/votm3/Scripts/controllers/overview-controller.js#L10
Because you are using grunt, you will want to build the project before serving the files. This will make the files and code modules build properly before serving the index.html. A popular module you can use is https://github.com/tschaub/grunt-gh-pages an get your builds serving properly.