amplify-cli: Amplify CLI yields TypeError on almost all commands

Note: If your issue/bug is regarding the AWS Amplify Console service, please log it in the Amplify Console GitHub Issue Tracker

Describe the bug All CLI commands that seems to touch the cloud now yields the following error in some form: The 'request' argument must be string. Received type undefined

Simply running “amplify status” seems to show the correct status, followed by:

The 'request' argument must be string. Received type undefined TypeError [ERR_INVALID_ARG_TYPE]: The 'request' argument must be string. Received type undefined at /home/fabian/.nvm/versions/node/v11.4.0/lib/node_modules/@aws-amplify/cli/node_modules/esm/esm.js:1:224803 at Object.<anonymous> (/home/fabian/.nvm/versions/node/v11.4.0/lib/node_modules/@aws-amplify/cli/node_modules/esm/esm.js:1:251922) at Object.t (/home/fabian/.nvm/versions/node/v11.4.0/lib/node_modules/@aws-amplify/cli/node_modules/esm/esm.js:1:279775) at n (/home/fabian/.nvm/versions/node/v11.4.0/lib/node_modules/@aws-amplify/cli/node_modules/esm/esm.js:1:279589) at /home/fabian/.nvm/versions/node/v11.4.0/lib/node_modules/@aws-amplify/cli/lib/extensions/amplify-helpers/show-helpful-provider-links.js:54:44 at Array.forEach (<anonymous>) at AmplifyToolkit.<anonymous> (/home/fabian/.nvm/versions/node/v11.4.0/lib/node_modules/@aws-amplify/cli/lib/extensions/amplify-helpers/show-helpful-provider-links.js:53:31) at step (/home/fabian/.nvm/versions/node/v11.4.0/lib/node_modules/@aws-amplify/cli/lib/extensions/amplify-helpers/show-helpful-provider-links.js:33:23) at Object.next (/home/fabian/.nvm/versions/node/v11.4.0/lib/node_modules/@aws-amplify/cli/lib/extensions/amplify-helpers/show-helpful-provider-links.js:14:53) at fulfilled (/home/fabian/.nvm/versions/node/v11.4.0/lib/node_modules/@aws-amplify/cli/lib/extensions/amplify-helpers/show-helpful-provider-links.js:5:58)

To Reproduce Steps to reproduce the behavior: I haven’t changed anything in the AWS environmnet for weeks, only updated the CLI.

Expected behavior I expect not to receive errors.

Desktop (please complete the following information): @aws-amplify/cli@3.15.0 Windows 10 Visual studio code, Ubuntu WSL.

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 23 (7 by maintainers)

Most upvoted comments

@fabianjj

This is my battle tested process whenever Amplify is not behaving:

(I have amplify CLI package installed globally)

  • reinstall packages for amplify-cli (amplify plugins sometimes dissapear, not sure why)
  • scan for amplify plugins on my project
  • reconfigure project
cd ~/.config/yarn/global/node_modules/@aws-amplify/cli
yarn
cd -
amplify plugin scan
amplify configure project

Off-topic, but: the Amplify team could probably save themselves a lot of time responding to issues if there was a FAQ or How-To guide on remediating Amplify-managed CF stacks and/or local Amplify envs that are in an unhappy state. One of the major appeals of the Amplify CLI is that it builds and manages stacks for you so you can focus on development, but then when something goes wrong there’s very little guidance on how to remediate.

Here is the file. I am using NPM in a cmd.exe (admin )

plugins.zip

A gloabl reinstall of “@aws-amplify/cli” did not help. When i do Amplify configure, i get:

? Select the backend providers. (Press <space> to select, to toggle all, to invert selection)

and no providers are shown.

I am running on windows 10

@DavidNelsonCordelia Thank you, I was having this problem and also getting ? Select the backend providers. (Press <space> to select, <a> to toggle all, <i> to invert selection), with nothing after it (enter would exit), when running amplify config. Reinstalled multiple times, nothing worked.

amplify plugin scan fixed it.

@DavidNelsonCordelia what OS did you run your amplify CLI on? Did you use npm or yarn to install the Amplify CLI?

Try to do a fresh global install of the Amplify CLI and then run a fresh amplify plugin scan, see if it resolves your problem. If not, run amplify plugin list and check what you have in the active plugins.

I am getting similiar problems to these I just updated the @aws-amplify/cli today (and everthing else) and started seeing these issues.

One additional item. If I try a comand like amplify function … the catagory does not exist The catagory pluggins seem not to be loaded