-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"index.html could not be copied to 404.html. Continuing without an error." for Angular 6 #37
Comments
Turns out Angular 6 changed After turning the option from the latter into the former everything works again. |
thanks for reporting! i will think about a solution... |
For now, until we provided a solution for this, you can solve this by doing:
|
@fmalcher Could you please explain what |
Otherwise your browser will try to find the application bundles in the domain root and not in the subfolder. Note the leading and trailing slash, they are important. I just tried both ways and they worked fine. Please let us know if there are issues! |
Please also take a look at |
@fmalcher @JohannesHoppe Thank you for the clear description. This makes a lot more sense now. I ended up getting it to work last night by changing my github pages deploy branch to the When I built, I still ran Thank you!! |
"Failed to load resource: the server responded with a status of 404 ()" |
There could be multiple reasons for that. Usually it's a configuration error. You could debug this now, or you need to wait some time until I add some upfront validations to the code. I'm sorry. Busy time for us here. |
…of dist/. Need to explicitly pass the output dir to nah command. angular-schule/angular-cli-ghpages#37
solution for me:
but you should change path to photos |
I'm still getting an error .. This comes up as soon as I do
My project folder is in the following sequence portfolio -> dist -> portfolio -> index.html @fmalcher any other way I can work this out?
|
@JitendraGurjar This is an Angular 6 project. Path has changed from 5 to 6. For now, add the option |
Thank you for your quick response. But still getting the same error. |
You are not supposed to change the |
you dont follow my link
you should enter:
ng build --prod --output-path PROJECT --base-href "
https://romanshutsman.github.io/PROJECT /"
ngh --dir=dist/ PROJECT
пт, 20 лип. 2018 о 06:47 JitendraGurjar <notifications@github.com> пише:
… I'm getting following error
"index.html could not be copied to 404.html. Continuing without an error.
Successfully published!"
also adding screenshot.
[image: image]
<https://user-images.githubusercontent.com/41449599/42982152-98fbf2be-8bfd-11e8-8249-b5af5e95278d.png>
Inside angular.json
[image: image]
<https://user-images.githubusercontent.com/41449599/42981986-c66ad72a-8bfc-11e8-8f90-2917ebab3ef0.png>
And "defaultProject": "ngProj"
But when I am trying to hit the URL it gives me an following error.
[image: image]
<https://user-images.githubusercontent.com/41449599/42982059-23b2638a-8bfd-11e8-81e0-7b587d0f4bb4.png>
Please help me to resolve this issue. Thank you
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#37 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AbwAvuXA4RX_M_YAMpxwPFdCxQSCcsdxks5uIVLNgaJpZM4T8kaC>
.
|
is there any solution by now? im experiencing issues deploying my project ng --dir=dis/project |
The command of this project is called |
yes small error in my comment here, used ngh |
@JohannesHoppe thank you for your support. I tried that command but still not working, earlier it was showing 404 but now it is showing a blank page. |
@JitendraGurjar You should see the error in the browser console. |
Guys, I was just trying to get things working and I noticed that setting a the exact commands I used were: and after that I did: Note by Johannes: |
@JitendraGurjar try write in index.html Note by Johannes: |
@romanshutsman I am not sure how correct it is to change the contents of your built files... |
Have you tried: |
It works |
@JohannesHoppe when I use my error is Also tried |
My error msg is also I solved this problem magically by adding |
Execute one by one in GIT BASH. I got rid of 404.html problem npm i angular-cli-ghpages --save-dev |
|
OMFG Thank you !!!!! |
@gaizik I have followed the all the steps, But I could not deploy my project in github,its showing error when pushing .. Followed this steps: { ProcessError: bash: /dev/tty: No such device or address any changes i need to do ? |
You have to authenticate. Read that part about GH_TOKEN |
Thanks for reply @JohannesHoppe , Can you please elaborate GH_TOKEN, and Any suggestion links. |
hi guys I just want to deploy my app to firebase and I have this problem "This file does not exist and there was no index.html found in the current directory or 404.html in the root directory. Why am I seeing this? You can also add a 404.html in the root of your site to replace this page with a custom error page." |
Any help |
this worked reallly great |
FOUND THE WORKING FIX!!!
Happy coding. |
To all of you. Please read the following article first, many questions should be answered there:https://angular.schule/blog/2020-01-everything-github Among other things the new API (ng deploy) is shown here. |
That seems much more straight forward. It's just the one command: Thank you! |
npx angular-cli-ghpages --dir=dist/git getting this error that i dont understand |
…S ***!! - REF: https://alligator.io/angular/deploying-angular-app-github-pages/ - trying angular-cli-ghpages again - ng build --prod --base-href "cbakerphoto" - ng --dry-run - ngh --message="Another deploy attempt via angular-cli-ghpages" NO! DO-OVER! - REF: https://medium.com/tech-insights/how-to-deploy-angular-apps-to-github-pages-gh-pages-896c4e10f9b4 - ng build --prod --base-href "https://shigimcp.github.io/cbakerphoto/" - npx angular-cli-ghpages — dir=dist/cbakerphoto - OOPS! npx angular-cli-ghpages — dir=dist/cbakerphoto-app/ - RESULT: 404 error at https://shigimcp.github.io/cbakerphoto/ DO OVER! AGAIN! - REF: angular-schule/angular-cli-ghpages#37 - REF: https://angular.io/guide/deployment#deploy-to-github-pages - ng build --prod --output-path ../docs --base-href /cbakerphoto-app/ - npx angular-cli-ghpages — dir=dist/cbakerphoto-app/ - REF: https://medium.com/tech-insights/how-to-deploy-angular-apps-to-github-pages-gh-pages-896c4e10f9b4 - ng build —base-href="https://shigimcp.github.io/cbakerphoto/" - OH, FUGGIT! I'm just scrambling now...
Solution for me : worked successfully!!!!!! ng build --prod --output-path project --base-href="https://tibari1980.github.io/SiteAngular7/" |
index.html could not be copied to 404.html. This does not look like an angular-cli project?! |
@deepakcs7050 It looks like youre trying to run the command from the dist folder. Please run it from the project root. 🙂 |
Created an empty Angular 6 application. Installed ngh globally and then ran the next two commands:
then got this as output:
The url itself (https://dutchmandavid.github.io/angular-io-code) now gives the next error:
Copying index.html and renaming it to 404.html does nothing - even after rebuilding and ngh-ing it again.
Archive for if the page ever changes: http://archive.is/uQxVg (web.archive.org didn't want to cooperate)
The text was updated successfully, but these errors were encountered: