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

npx ampx info fails to run #2369

Open
Ao1K opened this issue Dec 24, 2024 · 3 comments
Open

npx ampx info fails to run #2369

Ao1K opened this issue Dec 24, 2024 · 3 comments
Labels
backend-cli Issue is related to Amplify backend CLI bug Something isn't working dependency Issue related to upstream dependency

Comments

@Ao1K
Copy link

Ao1K commented Dec 24, 2024

Environment information

PS C:\Users\Chet\Documents\theProject\amplify-next-template> npx ampx info --debug

ampx info

Generates information for Amplify troubleshooting

Options:
      --debug  Print debug logs to the console        [boolean] [default: false]
  -h, --help   Show help                                               [boolean]

Error: Command failed: wmic os get Caption
os - Alias not found.


[DEBUG] 2024-12-24T21:15:07.785Z: Error: Command failed: wmic os get Caption
os - Alias not found.


    at y (C:\Users\Chet\Documents\theProject\amplify-next-template\node_modules\envinfo\dist\envinfo.js:1:130041)
    at e.exports.sync (C:\Users\Chet\Documents\theProject\amplify-next-template\node_modules\envinfo\dist\envinfo.js:1:131910)
    at e.exports (C:\Users\Chet\Documents\theProject\amplify-next-template\node_modules\envinfo\dist\envinfo.js:1:128247)
    at e.exports (C:\Users\Chet\Documents\theProject\amplify-next-template\node_modules\envinfo\dist\envinfo.js:1:107151)
    at C:\Users\Chet\Documents\theProject\amplify-next-template\node_modules\envinfo\dist\envinfo.js:1:27846
    at async Promise.all (index 0)
    at async EnvironmentInfoProvider.getEnvInfo (file:///C:/Users/Chet/Documents/theProject/amplify-next-template/node_modules/@aws-amplify/backend-cli/lib/info/env_info_provider.js:12:22)
    at async Object.handler (file:///C:/Users/Chet/Documents/theProject/amplify-next-template/node_modules/@aws-amplify/backend-cli/lib/commands/info/info_command.js:30:33)

Describe the bug

npx ampx info fails to generate any information on the environment. Above I've shown the command run with --debug included, but it fails in the same way without --debug included.

Reproduction steps

Environment:
I am using Windows 10 version 19045.5247. Please inform me what other information on the environment is relevant.

Reproduction:

  1. Clone the repository. I used the one from the link below. Follow instructions for "Create repository from template".
    https://docs.amplify.aws/nextjs/start/quickstart/nextjs-app-router-client-components/#1-create-the-repository
    You can also clone the repo used in bug demonstration. For me the result is the same:
    https://github.com/Ao1K/amplify-next-template
  2. Open powershell. cd to the repo and run npm install
    Aside: installing dependencies through npm install warns of 3 vulnerabilities. Running or not running npm audit fix --force does not resolve the issue with npx ampx info.
  3. Run npx ampx info --debug.
@Ao1K Ao1K added the pending-triage Incoming issues that need categorization label Dec 24, 2024
@ykethan
Copy link
Member

ykethan commented Dec 27, 2024

Hey @Ao1K, thank you for reaching out. Does the error also occur when running other commands such as npx ampx sandbox?
Could you try switching to CMD terminal and let us know if this error does occur?

@ykethan ykethan added pending-response Issue is pending response from author backend-cli Issue is related to Amplify backend CLI labels Dec 27, 2024
@Ao1K
Copy link
Author

Ao1K commented Dec 27, 2024

Thanks @ykethan. Yeah, still occurs with the cmd terminal. It fails in the same exact way, according to --debug.

Other commands work. I'm able to run and use npx ampx sandbox and npx ampx generate outputs.

@github-actions github-actions bot removed the pending-response Issue is pending response from author label Dec 27, 2024
@ykethan
Copy link
Member

ykethan commented Dec 30, 2024

Hey @Ao1K, thank you for the information. On digging into this, the issue appears to be similar to tabrindle/envinfo#213
From the issue it appears WMIC utility is deprecated on win 10 and 11 that is currently raising this message.

Marking as bug for tracking this behavior.

@ykethan ykethan added bug Something isn't working dependency Issue related to upstream dependency and removed pending-triage Incoming issues that need categorization labels Dec 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend-cli Issue is related to Amplify backend CLI bug Something isn't working dependency Issue related to upstream dependency
Projects
None yet
Development

No branches or pull requests

2 participants