Skip to content

"index.html could not be copied to 404.html." on ng deploy #86

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

Closed
yodigi7 opened this issue Dec 20, 2019 · 1 comment
Closed

"index.html could not be copied to 404.html." on ng deploy #86

yodigi7 opened this issue Dec 20, 2019 · 1 comment

Comments

@yodigi7
Copy link

yodigi7 commented Dec 20, 2019

Tried to use the ng deploy however it gave the above error. Also ng build --base-href=/path/ && ngh fails.

Looking at #37 I changed the build output dir to be dist rather than the dist/[PROJECTNAME] default. This caused the ng build --base-href=/path/ && ngh to succeed however ng deploy still fails.

@JohannesHoppe
Copy link
Member

JohannesHoppe commented Dec 20, 2019

You are mixing the old command line syntax and the new "ng deploy" syntax.

The old command line syntax requires a build by you, it only deploys:

ng build --base-href=/path/
npx angular-cli-ghpages [OTHER OPTIONS]

The new "ng deploy" syntax builds and deploys. Therefore only in the new syntax the --base-href option is available:

ng deploy --base-href=/path/ [OTHER OPTIONS]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants