Skip to content

ng add returns [Inquirer] Hook functions can only be called from within a prompt #1539

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

Open
1 task done
darkedges opened this issue Oct 16, 2024 · 1 comment
Open
1 task done

Comments

@darkedges
Copy link

Describe the bug

Get an An unhandled exception occurred: [Inquirer] Hook functions can only be called from within a prompt See "/tmp/ng-zZYvvU/angular-errors.log" for further details. when using ng add @angular/material via a Terminal.

❯ ng add @angular/material
✔ Determining Package Manager
  › Using package manager: npm
✔ Searching for compatible package version
  › Found compatible package version:
    @angular/[email protected].
✔ Loading package information from registry
✖ [Inquirer] Hook functions can only be called from
  within a prompt
An unhandled exception occurred: [Inquirer] Hook functions can only be called from within a prompt
See "/tmp/ng-zZYvvU/angular-errors.log" for further details.

Link to the blitz that caused the error

https://stackblitz.com/edit/stackblitz-starters-a7sdtp?file=src%2Findex.html

Steps to reproduce

  1. issue ng add @angular/material in a terminal
  2. get the error

Expected behavior

Angular Schematics for Angular Material should be deployed to the project.

Parity with Local

Screenshots

image

Platform

Browser name  = Chrome
Full version  = 129.0.0.0
Major version = 129
navigator.appName = Netscape
navigator.userAgent = Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36 Edg/129.0.0.0
performance.memory = {
  "totalJSHeapSize": 81354125,
  "usedJSHeapSize": 73755453,
  "jsHeapSizeLimit": 4294705152
}
Hash = 134daa3c

Additional context

No response

@darkedges
Copy link
Author

Found this #1169 so perhaps we can close this and wait on that to be completed.

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

1 participant