Skip to content

Commit

Permalink
Merge pull request #1416 from vtexdocs/troubleshooting-service-config…
Browse files Browse the repository at this point in the history
…uration-app

EDU-12071 - Service configuration app troubleshooting guide
  • Loading branch information
henriquessb authored Sep 27, 2024
2 parents 13a0c52 + a076a12 commit f983b73
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -219,14 +219,4 @@ Each element in this array consists of:

Note that multiple apps can configure the same service. Hence, each element in this array represents a configuration originating from a different app.

## Troubleshooting

If you are developing a configuration app and the service that your app is configuring is not installed or linked in the same workspace you're working at, you may run into some errors. That happens because, when creating a new configuration app, the configuration builder first looks for the schema of that configuration in all the apps installed in your current workspace. Consequently, if the configuration builder cannot find this specific configuration, linking your app may fail.

To avoid errors, remember to always have the service you're configuring linked or installed in the same workspace you're developing your configuration app.

To publish your Configuration app without installing the service in the `master` workspace, you can `link` or `install` the Service app in an alternative branch and then use the `-w` flag when publishing:

```sh
vtex publish -w {alternativeBranchName}
```
> ℹ️ If you are getting errors with the service configuration app, see the [troubleshooting guide](https://developers.vtex.com/docs/guides/i-am-getting-errors-with-my-service-configuration-app).
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
title: "I am getting errors with my service configuration app"
slug: "i-am-getting-errors-with-my-service-configuration-app"
hidden: false
createdAt: "2024-09-09T10:00:00.000Z"
updatedAt: "2024-09-09T10:00:00.000Z"
tags:
- apps
- vtex-io
- services
---

If you are [developing a configuration app](https://developers.vtex.com/docs/guides/vtex-io-documentation-developing-service-configuration-apps), you may be getting errors because the service your app is configuring is installed or linked to a different workspace. This happens because, when creating a new configuration app, the configuration builder first looks for that configuration schema in all the apps installed in your current workspace. Consequently, linking your app may fail if the configuration builder cannot find this specific configuration.

## Solution

Below, we outline solutions for addressing errors with your service configuration app:

1. [Avoid errors when installing or linking your configuration app](#avoiding-errors-when-installing-or-linking-your-configuration-app).
2. [Publish your configuration app in an alternative workspace](#publishing-your-configuration-app-in-an-alternative-workspace).

### Avoiding errors when installing or linking your configuration app

To avoid errors, link or install the configuration app in the same workspace the service app is linked or installed. Follow the instructions below:

1. In a terminal, go to the desired workspace using the following VTEX IO CLI command:

```
vtex use workspace {desiredWorkspace}
```
> ℹ️ Replace {desiredWorkspace} with the workspace you want to work in.
2. If your service app is not yet linked or installed, [link](https://developers.vtex.com/docs/guides/vtex-io-documentation-linking-an-app) or [install](https://developers.vtex.com/docs/guides/vtex-io-documentation-installing-an-app) your service app.
3. [Link](https://developers.vtex.com/docs/guides/vtex-io-documentation-linking-an-app) or [install](https://developers.vtex.com/docs/guides/vtex-io-documentation-installing-an-app) your configuration app.
### Publishing your configuration app in an alternative workspace
To publish your configuration app without installing the service in the master workspace, follow the instructions below:
1. In a terminal, go to the desired workspace using the following VTEX IO CLI command:
```
vtex use workspace {desiredWorkspace}
```
Replace `{desiredWorkspace}` with the workspace you want to work in.
2. If your service app is not yet linked or installed, [link](https://developers.vtex.com/docs/guides/vtex-io-documentation-linking-an-app) or [install](https://developers.vtex.com/docs/guides/vtex-io-documentation-installing-an-app) your service app.
3. Create a new version of your configuration app by following the instructions in [Releasing a new app version](https://developers.vtex.com/docs/guides/vtex-io-documentation-releasing-a-new-app-version).
4. [Publish](https://developers.vtex.com/docs/guides/vtex-io-documentation-publishing-an-app) your configuration app using the following command:
```
vtex publish -w {desiredWorkspace}
```
The `-w` flag allows you to choose the workspace of the app you are publishing.

0 comments on commit f983b73

Please sign in to comment.