Skip to content

"Could not find the ng executable." Error #6187

@jwowillo

Description

@jwowillo

[REQUIRED] Environment info

firebase-tools:

Firebase CLI Version: 12.4.6

Platform:

Ubuntu

[REQUIRED] Test case

firebase deploy --only hosting

.firebaserc:

{
  "projects": {
    "default": "county-collector"
  },
  "targets": {},
  "etags": {}
}

firebase.json:

{
  "hosting": {
    "source": ".",
    "ignore": [
      "firebase.json",
      "**/.*",
      "**/node_modules/**"
    ],
    "frameworksBackend": {
      "region": "us-central1"
    }
  }
}

Outputs:
Error: Could not find the ng executable.

[REQUIRED] Steps to reproduce

  1. npm install @angular/cli: Note that ng executable path from which ng is /usr/local/bin/ng
  2. Install Firebase CLI
  3. firebase deploy --only hosting

[REQUIRED] Expected behavior

Correctly deploys angular app or describes documentation to change ng path.

[REQUIRED] Actual behavior

Fails to find ng executable.

[2023-07-26T15:09:51.656Z] > command requires scopes: ["email","openid","https://www.googleapis.com/auth/cloudplatformprojects.readonly","https://www.googleapis.com/auth/firebase","https://www.googleapis.com/auth/cloud-platform"]
[2023-07-26T15:09:51.657Z] > authorizing via signed-in user (<EMAIL>)
[2023-07-26T15:09:51.657Z] [iam] checking project county-collector for permissions ["firebase.projects.get","firebasehosting.sites.update"]
[2023-07-26T15:09:51.659Z] >>> [apiv2][query] POST https://cloudresourcemanager.googleapis.com/v1/projects/<PROJECT-NAME>:testIamPermissions [none]
[2023-07-26T15:09:51.662Z] >>> [apiv2][(partial)header] POST https://cloudresourcemanager.googleapis.com/v1/projects/<PROJECT-NAME>:testIamPermissions x-goog-quota-user=projects/county-collector
[2023-07-26T15:09:51.663Z] >>> [apiv2][body] POST https://cloudresourcemanager.googleapis.com/v1/projects/<PROJECT-NAME>:testIamPermissions {"permissions":["firebase.projects.get","firebasehosting.sites.update"]}
[2023-07-26T15:09:51.798Z] <<< [apiv2][status] POST https://cloudresourcemanager.googleapis.com/v1/projects/<PROJECT-NAME>:testIamPermissions 200
[2023-07-26T15:09:51.798Z] <<< [apiv2][body] POST https://cloudresourcemanager.googleapis.com/v1/projects/<PROJECT-NAME>:testIamPermissions {"permissions":["firebase.projects.get","firebasehosting.sites.update"]}
[2023-07-26T15:09:51.799Z] >>> [apiv2][query] GET https://firebase.googleapis.com/v1beta1/projects/<PROJECT-NAME> [none]
[2023-07-26T15:09:52.061Z] <<< [apiv2][status] GET https://firebase.googleapis.com/v1beta1/projects/<PROJECT-NAME> 200
[2023-07-26T15:09:52.061Z] <<< [apiv2][body] GET https://firebase.googleapis.com/v1beta1/projects/<PROJECT-NAME> {"projectId":"<PROJECT-NAME>","projectNumber":"<PROJECT-NUMBER>","displayName":"<PROJECT-NAME>","name":"projects/<PROJECT-NAME>","resources":{"hostingSite":"<PROJECT-NAME>","storageBucket":"<PROJECT-NAME>.appspot.com","locationId":"us-central"},"state":"ACTIVE","etag":"1_ed644d71-71cc-47e7-a03a-f03620977b42"}

   Thank you for trying our early preview of Angular support on Firebase Hosting.
   During the preview, support is best-effort and breaking changes can be expected. Proceed with caution.

   Documentation: https://firebase.google.com/docs/hosting/frameworks/angular
   File a bug: https://github.com/firebase/firebase-tools/issues/new?template=bug_report.md
   Submit a feature request: https://github.com/firebase/firebase-tools/issues/new?template=feature_request.md

   We'd love to learn from you. Express your interest in helping us shape the future of Firebase Hosting: https://goo.gle/41enW5X


Error: Could not find the ng executable.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions