docs.webiny.com icon indicating copy to clipboard operation
docs.webiny.com copied to clipboard

Cannot Destroy Cloud Infrastructure

Open machineghost opened this issue 3 years ago • 3 comments

I tried to follow the steps on https://www.webiny.com/docs/infrastructure/basics/destroy-cloud-infrastructure, but the very first command fails with the following errors ...

In the parent folder:

$ yarn webiny destroy api --env dev
yarn run v1.22.5
warning package.json: No license field
$ /home/me/main-project/node_modules/.bin/webiny destroy api --env dev
✘ Plugin "destroy" was not found!
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

In the project folder:

$ yarn webiny destroy api --env dev
webiny error: Could not detect project application in given directory (/home/me/main-project/webiny/webiny-experiment/api/api).

But, it should be possible to delete the stuff Webiny creates :(

machineghost avatar Jul 24 '22 20:07 machineghost

Hey, it should be apps/api, not api.

Recently we did some updates on docs, and it looks like the article you linked wasn't updated.

We'll fix that.

adrians5j avatar Jul 25 '22 04:07 adrians5j

EDITED

I was running it in the parent folder again. When I ran it in the sub-folder, it worked! Thanks.

machineghost avatar Jul 25 '22 15:07 machineghost

@machineghost you actually should be running everything from the root project folder. Just reference your apps with a proper folder path, like Adrian mentioned:

// From the project root run this:
yarn webiny destroy apps/api --env=dev

Pavel910 avatar Jul 25 '22 15:07 Pavel910