Skip to content

v3.0.2: "path argument undefined" error when running standalone with npx #203

@JohannesHoppe

Description

@JohannesHoppe

Description

When running npx angular-cli-ghpages in a non-Angular project (package.json in working directory), the command fails with:

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

Reproduction

  1. Create a simple repo with just a dist/ folder containing files to deploy
  2. Run: npx angular-cli-ghpages --dir=dist --branch=gh-pages
  3. Error occurs

Workaround

Installing the package first fixes the issue:

npm install angular-cli-ghpages
npx angular-cli-ghpages --dir=dist --branch=gh-pages

Context

This was discovered while setting up a CI workflow for a non-Angular project that uses angular-cli-ghpages to deploy static content.

Environment

  • angular-cli-ghpages: 3.0.2
  • Node.js: 22.x
  • Running in GitHub Actions

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions