Navigation menu errors are common, even for seasoned developers. Learn seven common navigation menu errors and how to solve them using CSS.
Compare the top React toast libraries for when it’s more trouble than it’s worth to create your own custom toast components.
TanStack Start vs. Next.js: both are powerful full-stack React frameworks, but they take fundamentally different approaches to architecture, routing, and developer experience. This guide breaks down their core features from SSR and data fetching to TypeScript support and deployment, to help you choose the right tool for your next React project.
While it may seem like a maintenance update, Angular v20 is packed with practical, production-ready upgrades that will enable us to build apps faster and with more confidence.
16 Replies to "Automatically build and deploy a Vue.js app with GitHub Pages"
Got this error:
Command failed with exit code 1: git –work-tree dist commit -m gh-pages
error: cannot spawn G:/app-name/.git/hooks/pre-commit: No such file or directory
worked like a charm! Thanks a bunch 🙂
Sorry but it isn’t working. I get an empty page when I access github.io/project_name.
Also, each time I run “npm run deploy” the vue.config.js goes back to publicPath: ‘/project name/’ and the changes made to package.json go to default, meaning no deploy script and no execa dependencies.
I had the same problem but fixed it by changing the publicPath to:
publicPath: ”,
Remember to also change gh-pages-deploy.js incase you are using a branch other than master. You have to change the following line:
await execa(“git”, [“checkout”, “-f”, “master”]);
It worked for me, i just deployed my first Vue.js project in github.
Thanks for the suggestions! It worked fine for me: https://gentax.github.io/mathGraphs/
Just one issue, the branch ‘master’ is now ‘main’ on github, if you start from scratch!
The exactly same is happening to me. Idk why
Worked fine, thanks!
Change to get to work on windows npm install –save-dev rimraf
And change
await execa(“rm”, [“-r”, folderName]);
to
await execa(“rimraf”, [folderName]);
This helped me! Tanks for the tip. Also thanks for the article author, nice job!
Hi, I have a problem. After run deploy i get this error:
Error: Cannot find module ‘C:\Users\islam\dev\RODRI\coresuite\scripts\gh-pages-deploy.js’
at Function.Module._resolveFilename (internal/modules/cjs/loader.js:793:17)
at Function.Module._load (internal/modules/cjs/loader.js:686:27)
at internal/main/run_main_module.js:17:11 {
code: ‘MODULE_NOT_FOUND’,
requireStack: []
}
Somebody had the same problem ? Thanks!
I think I figured it out, you need to make sure to push your changes for vue.config.js and the gh-pages-deploy.js to your main branch so that they are saved. Otherwise, when you run gh-pages-deploy.js, it temporarily creates a local gh-pages branch, pushes all the changes to the remote gh-pages, then deletes the branch which effectively deletes your changes to vue.config.js and gh-pages-deploy.js
You have probably created a “Scripts” folder instead of “scripts” (case sensitive). The article says “Scripts” and I had the same the same error.
My project seems to build, and I get a message saying it has been successfully deployed, but all it shows is the readme when going to the gh-pages url. Anyone have the same experience?
same issue and ive been through every single stackoverflow post and every web tutorial i could find. no matter what i try, i only see the readme file
The version of Execa needs to be set to “^5.1.1” as after 6.0+ the usage has changed.