amplify-cli: Cannot add auth - command not found
Do you want to request a feature or report a bug? Bug
What is the current behavior?
Attempting to run
amplify auth add
returns a “Command not found” error, with the suggestion:
amplify auth <subcommands>
add [......]
Attempting to run
amplify add auth (inverting ‘auth’ and ‘add’) produces the same outcome
On the off chance, I also tried
amplify add authentication,
but this triggered the analytics flow. Analytics seems to be the default? (Running amplify add anything also triggered the analytics flow).
Taking a brief look at the code, it looks like Auth is structured very differently to the other modules. There is no “auth/add.js” file in the commands folder, but rather, the add command is listed in the index.js two levels up. (The index.js also looks substantially different to other commands). It seems like maybe it got missed in a code restructure?
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem.
See above.
What is the expected behavior?
Running amplify auth add should start the wizard process to create a cognito user store.
Which versions of Amplify CLI, and which OS are affected by this issue? Did this work in previous versions?
Amplify version: 0.1.14 (This is the first version I have used, but I assume this worked previously) Node version: 8.11.4 NPM version: 5.6.0 OS: Windows 10 (Powershell)
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Reactions: 3
- Comments: 27 (15 by maintainers)
Hey Erica, we’re seeing some anomalous behavior on windows due to the filesystem. We’ll be figuring out a solution in the next couple of days and get back to you.
@kaustavghosh06 Any updates on windows support with gluegun? Thanks!
Hey Erica, awesome work figuring out the root cause 😄. I’ve gone through Glueguns codebase and in many places they’ve considered filepaths to be of format (Unix format) dir1/dir2/dir3 instead of considering dir\dir2\dir2 format which is the windows filesystem formst which is causing erroneous behavior of the CLI in windows natively. For what it’s worth I’ve filed an issue with Gluegun a few weeks back - https://github.com/infinitered/gluegun/issues/384 and hopefully we’ll have a solution for it soon. In the meanwhile checkout @mwarger post of using wsl in native windows power shell out here - https://github.com/aws-amplify/amplify-cli/issues/13. I think it’s a great workaround.