I worked on some project and when I uploaded on Github, site's not rendering. I think only JS file is not working. Another problem is that if I open index.html locally, it's not working either. If I run with "npm run dev" then it works perfectly. I'm using Vite and npm on projects to work more fast while I'm coding.
I tried to upload again on github. checking file path.
https://github.com/einstyr/The-Planets.git this is repository link
Related
So I have this problem when I try to deploy to gh-pages after everything the page ends up being white but if I go to localhost:3000 everything is working just fine this is the GitHub pages link
https://greatkali419.github.io/coding_challenge/
Then this is my repo link
https://github.com/greatkali419/coding_challenge
I tried deleting the repo and upload again but it's not working
Your code and configuration are absolutely fine, but you didn't remove the /build directory from the .gitignore file. That's why your live gh-pages didn't read the build file.
i have downloaded this project from github: https://github.com/DrA1ex/fourier
I am using XAMPP, localhost.
i am new to github, so i wish for detailed help on this one.
i have cloned the project into my htdocs folder, when i try to connect to it won't work.
When i click on the index.html file located in the src folder, it leads to a blank page.
The project is using bootstrap and i don't know how to make it work.
Is there any more info needed, to solve this, please let me know.
Best regards
There is no need to use XAMPP for this project since it is using javascript and Node to run everything.
What you need to do is have node installed on your computer. Go to Nodejs.org and download the recommended LTS version. This will also install npm (Node Package Manager)
After the installation, go to your project folder, where the file package.json is located, open a terminal (CMD - Command Line) and run:
npm install
This will download all the dependencies that are needed for this project to work.
When it is done, you just need to open a terminal again on the same directory and run:
npm start
Your project will run on localhost (a link will probably appear on your terminal). For me, the project run on http://localhost:4200/ but for you it might be different.
Hope this helps
I'm trying to deploy this repo
https://github.com/stepseazy/checkers/
to this website
https://stepseazy.github.io/checkers
However, I'm getting 404 errors. I also tried heroku. It does work when I serve the build locally. Not sure what's wrong. Please help!!!
You'll have to distinguish your dev environment and your production one. On dev mode, you run npm start that does things (as instructed in package.json) and act as a local server and serves you project on http://localhost:3000. You simply cannot use that in production mode on Github or Heroku.
You need to deploy the built version, running npm run build. It will create a javascript file in a dist folder. You might want, on Github, create a gh-pages branch, build this production ready file on it, create an index.html file that serves it, and commit that.
I'm no expert on Heroku but it might be a slightly similar case (run post-deploy scripts that build your app and serve it through an index.html file).
Hope that help.
I am doing school project and we have to use Cordova. I created Cordova app and I set up Webpack. Site showed "Hello webpack", so everything worked fine.
Then I installed React and changed main.js file, but my site is still showing "Hello webpack" even when it is not in the file anymore.
During the changes I used this command:
chokidar "**/*.js" "www/**" -c "cordova prepare browser"
I could see this in the terminal:
Watching "/*.js", "www/" .. change:src/main.js
I also tried manually cordova preapre and then cordova run browser, but nothing changed.
I can see changes in www/index.html file. Just not the js files.
edit
I was probably using wrong command. Now I use this one and everything works:
chokidar "www/**" -c "cordova run browser"
please take a look at these repositories. Those setups differs from yours but might help building one for your project.
I've been having a nightmare setting up a reactjs web app/webpack etc myself. So now I'm using Gatsby, which has been a life saver!!!!
I've installed Gatsby locally using NPM. And I want to deploy it to my Github page... It's kinda worked...
Here are the instructions I've followed:
https://www.gatsbyjs.org/docs/deploy-gatsby/#github-pages
And here is what I'm seeing on my GitHub.io page:
https://reenaverma.github.io/
Its not the default starter pack index page/content, I'm seeing on my localhost 8000.
I can see on my Github repo the correct content has deployed to Github:
https://github.com/ReenaVerma/reenaverma.github.io
But I'm not actually seeing it on my URL. It looks like it's surfacing my readme first... How can I fix this?
Any ideas?
I see that your gatsby project is your main gh-pages. Therefore, you need to put your build in the master branch not in the gh-pages branch.
So you need to put your src code in a branch of your choice & in the master branch you put your generated build.
Change your script to the following
"scripts": {
"deploy": "gatsby build && gh-pages -b master -d public",
}