danielschmitz / my-sales-app-angular

Sales App from my book Angular 17 from scratch
10 stars 2 forks source link

5.4 Its Time to Deploy! -> Error on my end. #14

Open jaselmoreraalejos opened 4 months ago

jaselmoreraalejos commented 4 months ago

Hi! When I run: ng deploy --base-href=/sales/ . Im getting this error: index.html could not be copied to 404.html. Proceeding without it. ❌ An error occurred when trying to deploy: .nojekyll file could not be created. ENOENT: no such file or directory, open 'C:\Users\MyUser\Documents\Angular\sales\dist\sales\browser.nojekyll'

Any idea? Error

danielschmitz commented 4 months ago

Hello, please try this solution and then let me know if it worked:

Turns out Angular changed angular.json's "outputPath": "dist/" into "outputPath": "dist/[PROJECTNAME]", which placed everything in the dist folder in a subfolder, which breaks ngh's functionality.

source: https://github.com/angular-schule/angular-cli-ghpages/issues/37#issuecomment-388588099