stackblitz / webcontainer-core

Dev environments. In your web app.
https://webcontainers.io
MIT License
3.85k stars 152 forks source link

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

Open darkedges opened 8 hours ago

darkedges commented 8 hours ago

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/material@18.2.8.
✔ 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 commented 8 hours ago

Found this https://github.com/stackblitz/webcontainer-core/issues/1169 so perhaps we can close this and wait on that to be completed.