Cannot Destroy Cloud Infrastructure
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 :(
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.
EDITED
I was running it in the parent folder again. When I ran it in the sub-folder, it worked! Thanks.
@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