Skip to content

Commit

Permalink
docs: Add troubleshooting for tutorial with Gatsby
Browse files Browse the repository at this point in the history
  • Loading branch information
carolinamenezes committed Apr 29, 2022
1 parent 74b2f70 commit 9b1f842
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ When developing your store's website, you will use Git to push your code to the
</summary>
We'll use the <a href="https://developers.vtex.com/vtex-developer-docs/docs/vtex-io-documentation-vtex-io-cli-installation-and-command-reference">VTEX IO CLI</a> to set up your VTEX environment before you start developing your FastStore storefront.
<ul>
<li>Install VTEX IO CLI by running <pre>yarn global add vtex</pre></li>
</ul>
<br/>
<li><a href="https://developers.vtex.com/vtex-developer-docs/docs/vtex-io-documentation-vtex-io-cli-install">Install VTEX IO CLI according to your operating system</a></li>
<img src="/img/tutorials/gatsby/vtex-cli.png"/>

<li>In the following, install the <code>settings</code> CLI plugin by running: </li>
<pre>vtex plugins install settings</pre>
</ul>
</details>

<details>
Expand All @@ -101,26 +101,39 @@ If you don't have a GitHub account, first go [here](https://github.com/join) and
## Step 3: Setting up your VTEX environment

1. Open up the terminal and log in to your VTEX account.
- *Replace the value between curly braces according to your scenario.*

```shell
vtex login {account}
```

:::caution
Replace the value between curly braces according to your scenario.
:::

![vtex login](/img/tutorials/gatsby/vtex-login.png)

2. Run the following command to setup the environment and install all the necessary apps to start developing with FastStore.
2. Install all the necessary apps to start developing with FastStore.

```shell
vtex install vtex.admin-search@1.x vtex.search-resolver@1.x vtex.admin-cms@0.x vtex.graphql-gateway@0.x vtex.store-sitemap@2.x vtex.store@2.x vtex.messages@1.x vtex.cms-builder-sf-jamstack@0.x vtex.intelligent-search-api@0.x && vtex settings set vtex.store enableOrderFormOptimization true && vtex settings set vtex.messages automaticTranslation false && vtex settings set vtex.search-resolver slugifyLinks true
vtex install vtex.admin-search@1.x vtex.search-resolver@1.x vtex.admin-cms@0.x vtex.graphql-gateway@0.x vtex.store-sitemap@2.x vtex.store@2.x vtex.messages@1.x vtex.cms-builder-sf-jamstack@0.x vtex.intelligent-search-api@0.x
```

![vtex install](/img/tutorials/gatsby/vtex-install.png)

3. Access your account admin at `https://{account}.myvtex.com/admin`.
4. Go to *Store Setup > Search > Integration Settings* and check if the [VTEX Intelligent Search](https://help.vtex.com/tracks/vtex-intelligent-search) app (`vtex.search-resolver@1.x`) [indexing](https://help.vtex.com/tracks/vtex-intelligent-search) has started. If not, click on **Start Integration**. [Check our docs for more info on the Intelligent Search.](https://help.vtex.com/tracks/vtex-intelligent-search)
3. Install the `settings` plugin from the VTEX IO CLI.

```shel
vtex plugins install settings
```

4. Set up your VTEX environment variables.

```shell
vtex settings set vtex.store enableOrderFormOptimization true && vtex settings set vtex.messages automaticTranslation false && vtex settings set vtex.search-resolver slugifyLinks true
```

:::caution
If you find any problems while setting up your VTEX environment, please refer to our [Troubleshooting](/tutorials/gatsby/Troubleshooting) article.
:::

5. Access your account admin at `https://{account}.myvtex.com/admin`.
6. Go to *Store Setup > Search > Integration Settings* and check if the [VTEX Intelligent Search](https://help.vtex.com/tracks/vtex-intelligent-search) app (`vtex.search-resolver@1.x`) [indexing](https://help.vtex.com/tracks/vtex-intelligent-search) has started. If not, click on **Start Integration**. [Check our docs for more info on the Intelligent Search.](https://help.vtex.com/tracks/vtex-intelligent-search)

![Intelligent Search](/img/tutorials/gatsby/integration-settings.png)
![Intelligent Search](/img/tutorials/gatsby/integration-settings.png)
31 changes: 31 additions & 0 deletions docs/docs/tutorials/gatsby/Troubleshooting.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Troubleshooting

Throughout this tutorial, you may come across common errors that have already tricked other FastStore users. This article is intended to help you troubleshoot some of these issues.

## Part 1: Setting up your development environment

### Error: command settings not found

This error occurs because the `settings` plugin from the VTEX IO CLI is not installed. To fix this problem, please run the following command:

```
vtex plugins install settings
```

![](/img/tutorials/gatsby/settings-notfound.png)

### Error: App has route conflict

This error occurs because a version of the app with route conflict is already installed in your VTEX Account. To fix this problem, please use the `--force` flag after the app specification, for example:

```shell
vtex install vtex.store-sitemap@2.x --force
```

![](/img/tutorials/gatsby/route-conflict.png)

### Error: API 403 Forbidden

This error occurs because the user trying to set up the `enableOrderFormOptimization` setting doesn't have the necessary [User Role](https://help.vtex.com/en/tutorial/roles--7HKK5Uau2H6wxE1rH5oRbc?&utm_source=autocomplete) to perform this action. To fix this issue, please ask for a VTEX user with the **Owner (Admin Super)** role to run this command.

![](/img/tutorials/gatsby/403-api.png)
13 changes: 13 additions & 0 deletions docs/static/data/doc-update.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
[
{
"date": "2022-04-29",
"type": "Added",
"menu": "Tutorials",
"category": "Creating storefronts with Gatsby",
"path": "/tutorials/gatsby-overview",
"docs": [
{
"path": "/tutorials/gatsby/Troubleshooting",
"title": "Troubleshooting"
}
]
},
{
"date": "2022-04-08",
"type": "Added",
Expand Down
Binary file added docs/static/img/tutorials/gatsby/403-API.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 9b1f842

Please sign in to comment.