-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update to use pnpx and pnpm everywhere for envio command. #526
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ slug: /benchmarking | |
|
||
### Capturing the benchmark | ||
|
||
You can run `envio start --bench` to capture some benchmarking data while your indexer is running. This should not be run in production, since it holds each benchmark data point in memory and adds some overhead in writing to a file. | ||
You can run `pnpm envio start --bench` to capture some benchmarking data while your indexer is running. This should not be run in production, since it holds each benchmark data point in memory and adds some overhead in writing to a file. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The only downside of dropping |
||
|
||
### Printing the benchmark | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,6 +36,6 @@ The indexer has been built using v0.0.21 of Envio. | |
1. Clone the [repo](https://github.com/enviodev/liquidation-metrics) | ||
2. Install any other pre-requisite packages for Envio listed [here](https://docs.envio.dev/docs/installation#prerequisites) | ||
3. Install Envio via `npm i -g [email protected]` | ||
4. Generate indexing code via `envio codegen` | ||
5. Run the indexer via `envio dev` (make sure you have Docker running) | ||
6. Stop the indexer via `envio stop` | ||
4. Generate indexing code via `pnpm envio codegen` | ||
5. Run the indexer via `pnpm envio dev` (make sure you have Docker running) | ||
6. Stop the indexer via `pnpm envio stop` |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,6 +21,6 @@ The indexer has been built using v0.0.21 of Envio. | |
1. Clone the [repo](https://github.com/enviodev/uniV3-swaps) | ||
1. Install any other pre-requisite packages for Envio listed [here](https://docs.envio.dev/docs/installation#prerequisites) | ||
1. Install Envio via `npm i -g [email protected]` | ||
1. Generate indexing code via `envio codegen` | ||
1. Run the indexer via `envio dev` (make sure you have Docker running) | ||
1. Stop the indexer via `envio stop` | ||
1. Generate indexing code via `pnpm envio codegen` | ||
Comment on lines
23
to
+24
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is wrong |
||
1. Run the indexer via `pnpm envio dev` (make sure you have Docker running) | ||
1. Stop the indexer via `pnpm envio stop` |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,8 @@ slug: /cli-commands | |
|
||
This document contains the help content for the `envio` command-line program. | ||
|
||
**_Note:_** `envio` is an executable, but it is recommended to always run `pnpx envio@latest` for the init command and `pnpm envio` when interacting with a specific repo. This ensures that you are using an up to date version for new projects, and use the correct version of the envio executable for local project you may look at. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the only file that I did not add pnpm or pnpx to. |
||
|
||
**Command Overview:** | ||
|
||
* [`envio`↴](#envio) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,17 +7,17 @@ slug: /common-issues | |
|
||
# Common issues | ||
|
||
## `Cannot find module` errors on `envio start` | ||
## `Cannot find module` errors on `pnpm envio start` | ||
|
||
This error indicates that the indexer is unable to find the necessary files to start the indexer. | ||
|
||
Delete the `generated` folder and run | ||
|
||
```bash | ||
envio codegen | ||
pnpm envio codegen | ||
``` | ||
|
||
> Always run `envio codegen` straight after cloning an indexer repo using Envio. | ||
> Always run `pnpm envio codegen` straight after cloning an indexer repo using Envio. | ||
|
||
## Indexer not starting at the specified start block | ||
|
||
|
@@ -26,13 +26,13 @@ If the indexer starts running but does not index the smart contracts from the `s | |
Run | ||
|
||
```bash | ||
envio stop | ||
pnpm envio stop | ||
``` | ||
|
||
and then | ||
|
||
```bash | ||
envio dev | ||
pnpm envio dev | ||
``` | ||
|
||
## Tables for entities are not registered on Hasura | ||
|
@@ -42,13 +42,13 @@ Should the tables for the entities outlined in the schema file not show up on Ha | |
Run | ||
|
||
```bash | ||
envio stop | ||
pnpm envio stop | ||
``` | ||
|
||
and then | ||
|
||
```bash | ||
envio dev | ||
pnpm envio dev | ||
``` | ||
|
||
## Postgres running locally | ||
|
@@ -58,16 +58,14 @@ If Postgres is running locally on port 5432, then you can run the whole system w | |
In practice, this could look like this: | ||
|
||
``` | ||
ENVIO_PG_PORT=5433 envio codegen | ||
ENVIO_PG_PORT=5433 envio dev | ||
ENVIO_PG_PORT=5433 pnpm envio codegenENVIO_PG_PORT=5433 pnpm envio dev | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Broken |
||
``` | ||
|
||
or | ||
|
||
``` | ||
export ENVIO_PG_PORT=5433 | ||
envio codegen | ||
envio dev | ||
pnpm envio codegenpnpm envio dev | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Broken |
||
``` | ||
|
||
NOTE: you can further customize how you connect to Postgres with these additional environment variables `ENVIO_POSTGRES_PASSWORD`, `ENVIO_PG_USER`, and `ENVIO_PG_DATABASE`. | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,7 +21,7 @@ Before we start indexing, you'll need to make sure you have the [prerequisites]( | |
|
||
Now that you have installed the prerequisite packages required, let’s jump into the practical steps of setting up the indexer. | ||
|
||
1. Open your terminal in an empty repository and initialize a new indexer by running the command ‘envio init’ | ||
1. Open your terminal in an empty repository and initialize a new indexer by running the command ‘pnpx envio@latest init’ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd skip |
||
|
||
<img src="/docs-assets/tutorial-op-bridge-1.png" alt="tutorial-op-bridge-1" width="100%"/> | ||
|
||
|
@@ -59,13 +59,13 @@ Before starting your indexer, run the command below to ensure that no conflictin | |
|
||
### Stopping the indexer: | ||
|
||
`envio stop` | ||
`pnpm envio stop` | ||
|
||
> Note: Ignore if you’re a first-time user. | ||
|
||
### Start the indexer: | ||
|
||
`envio dev` | ||
`pnpm envio dev` | ||
|
||
Now, let's run our indexer locally by running the command below. | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,7 +47,7 @@ More information on [the Quickstart](./contract-import) can be found in this doc | |
|
||
### Templates | ||
|
||
Select either the `ERC20`, `Greeter`, or `Blank` template following the `envio init` command. | ||
Select either the `ERC20`, `Greeter`, or `Blank` template following the `pnpx envio | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Broken |
||
|
||
More information on [the `Greeter` template](./greeter-tutorial) is available. | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,6 @@ The indexer has been built using v0.0.21 of Envio. | |
1. Clone the [repo](https://github.com/enviodev/aave-token-mainnet-events) | ||
1. Install any other pre-requisite packages for Envio listed [here](https://docs.envio.dev/docs/installation#prerequisites) | ||
1. Install Envio via `npm i -g [email protected]` | ||
1. Generate indexing code via `envio codegen` | ||
1. Run the indexer via `envio dev` (make sure you have Docker running) | ||
1. Stop the indexer via `envio stop` | ||
1. Generate indexing code via `pnpm envio codegen` | ||
1. Run the indexer via `pnpm envio dev` (make sure you have Docker running) | ||
1. Stop the indexer via `pnpm envio stop` |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,6 @@ The indexer has been built using v0.0.22 of Envio. | |
1. Clone the [repo](https://github.com/enviodev/erc4626-token-vault-indexer) | ||
1. Install any other pre-requisite packages for Envio listed [here](https://docs.envio.dev/docs/installation#prerequisites) | ||
1. Install Envio via `npm i -g [email protected]` | ||
1. Generate indexing code via `envio codegen` | ||
1. Run the indexer via `envio dev` (make sure you have Docker running) | ||
1. Stop the indexer via `envio stop` | ||
1. Generate indexing code via `pnpm envio codegen` | ||
1. Run the indexer via `pnpm envio dev` (make sure you have Docker running) | ||
1. Stop the indexer via `pnpm envio stop` |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,6 @@ The indexer has been built using 0.0.20 of Envio. | |
1. Clone the [repo](https://github.com/enviodev/onchain-governance-indexer) | ||
1. Install any other pre-requisite packages for Envio listed [here](https://docs.envio.dev/docs/installation#prerequisites) | ||
1. Install Envio via `npm i -g [email protected]` | ||
1. Generate indexing code via `envio codegen` | ||
1. Run the indexer via `envio dev` (make sure you have Docker running) | ||
1. Stop the indexer via `envio stop` | ||
1. Generate indexing code via `pnpm envio codegen` | ||
1. Run the indexer via `pnpm envio dev` (make sure you have Docker running) | ||
1. Stop the indexer via `pnpm envio stop` |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,6 +18,6 @@ The indexer has been built using v0.0.21 of Envio. | |
1. Clone the [repo](https://github.com/enviodev/reNFT-index) | ||
1. Install any other pre-requisite packages for Envio listed [here](https://docs.envio.dev/docs/installation#prerequisites) | ||
1. Install Envio via `npm i -g [email protected]` | ||
1. Generate indexing code via `envio codegen` | ||
1. Run the indexer via `envio dev` (make sure you have Docker running) | ||
1. Stop the indexer via `envio stop` | ||
1. Generate indexing code via `pnpm envio codegen` | ||
1. Run the indexer via `pnpm envio dev` (make sure you have Docker running) | ||
1. Stop the indexer via `pnpm envio stop` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we maybe even skip
envio
and havepnpm codegen
?