Skip to content
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

issue trying to deploy #193

Closed
whyvrafvr opened this issue Oct 8, 2024 · 16 comments Β· Fixed by #194
Closed

issue trying to deploy #193

whyvrafvr opened this issue Oct 8, 2024 · 16 comments Β· Fixed by #194

Comments

@whyvrafvr
Copy link

ng deploy now generates this message using Angular 18:

❌ An error occurred when trying to deploy:
The "path" argument must be of type string. Received undefined

No problem with build:

πŸ“¦ Building "my-app"
πŸ“¦ Build target "my-app:build:production"
Initial chunk files | Names | Raw size | Estimated transfer size
chunk-REPPZAOL.js | - | 634.01 kB | 134.41 kB
styles-2S7CTVXQ.css | styles | 149.86 kB | 9.41 kB
main-3JVGATQH.js | main | 78.06 kB | 20.35 kB
polyfills-EONH2QZO.js | polyfills | 34.54 kB | 11.32 kB

                  | Initial total | 896.47 kB |               175.48 kB

Lazy chunk files | Names | Raw size | Estimated transfer size
chunk-5FDAASR2.js | admin-module | 223.77 kB | 67.44 kB

Application bundle generation complete. [5.396 seconds]

β–² [WARNING] bundle initial exceeded maximum budget. Budget 512.00 kB was not met by 384.47 kB with a total of 896.47 kB.

Output location: (...)

@whyvrafvr
Copy link
Author

whyvrafvr commented Oct 8, 2024

repo attribute is mandatory folks

@fmalcher
Copy link
Member

fmalcher commented Oct 8, 2024

As long as the project is in a git repo and angular-cli-ghpages can access git, the repo argument is optional. It looks like it cannot detect the git repo in your case.
However, without knowing the exact command or seeing a minimal reproduction, we cannot investigate the issue in any way.
I am using angular-cli-ghpages successfully in a handful of Angular 18 projects and it always worked without problems. I'm afraid this is a strange constellation on your machine.

@whyvrafvr
Copy link
Author

could you please try with this one?
https://github.com/fairhive-labs/your-angular-project

ng deploy

❌ An error occurred when trying to deploy:
Failed to get remote.undefined.url (task must either be run in a git repository with a configured undefined remote or must be configured with the "repo" option).

% git remote -v
origin	https://github.com/fairhive-labs/your-angular-project.git (fetch)
origin	https://github.com/fairhive-labs/your-angular-project.git (push)

% git config --local --get-regexp remote
remote.origin.url https://github.com/fairhive-labs/your-angular-project.git
remote.origin.fetch +refs/heads/*:refs/remotes/origin/*
branch.master.remote origin

@fmalcher
Copy link
Member

fmalcher commented Oct 9, 2024

Thanks, I see the problem! This has something to do with the new remote option intrpduced in the latest release. This actually seems to be a bug on our side. When no remote is provided, it does not fall back to origin as described, but to undefined.

You can avoid this by providing the the remote option with origin manually in your angular.json. However, we will fix this. πŸ™‚

@whyvrafvr
Copy link
Author

whyvrafvr commented Oct 9, 2024

I've quickly checked out your code and yes there are few functions in git.js handling the options settings remote to undefined

@fmalcher fmalcher linked a pull request Oct 9, 2024 that will close this issue
@JohannesHoppe
Copy link
Member

JohannesHoppe commented Oct 22, 2024

Fixed in v2.0.2, via #194

@whyvrafvr
Copy link
Author

Awesome 😎
Will check asap
Thx πŸ™

@whyvrafvr
Copy link
Author

whyvrafvr commented Oct 22, 2024

hi @JohannesHoppe @fmalcher

I've updated this repo https://github.com/fairhive-labs/your-angular-project and unfortunately if I remove repo I still get:

Failed to get remote.undefined.url (task must either be run in a git repository with a configured undefined remote or must be configured with the "repo" option).

@JohannesHoppe
Copy link
Member

JohannesHoppe commented Oct 22, 2024

Ok, we will investigate. But could you first explain, why you only have an entry for angular-cli-ghpages in the package-lock.json and not in the package.json?

@whyvrafvr
Copy link
Author

maybe have a look in devDependencies...

"angular-cli-ghpages": "^2.0.2",

@JohannesHoppe
Copy link
Member

I'm blind! πŸ™ˆ

@whyvrafvr
Copy link
Author

I mean ng add angular-cli-ghpages installs it there.

@fmalcher
Copy link
Member

@whyvrafvr btw, as a workaround it also solves the problem if you provide the remote option. This removes the need for repo and it's a bit shorter in the config. However, we will find a solution!

@whyvrafvr
Copy link
Author

@whyvrafvr btw, as a workaround it also solves the problem if you provide the remote option. This removes the need for repo and it's a bit shorter in the config. However, we will find a solution!

As you can see on my code, yes I figured it out like that LOL πŸ˜‚

@JohannesHoppe
Copy link
Member

Please try out v2.0.3

@whyvrafvr
Copy link
Author

i've tested, removing repo attribute or parameter, and it works fine πŸ‘
thx you guys.

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

Successfully merging a pull request may close this issue.

3 participants