I was having the same errors as well after running:
Yarn install
Yarn build.
Facing the error as this thread mentioned when trying to execute "yarn db:migrate"
Stack trace:
yarn run v1.22.17
$ ./node_modules/.bin/typeorm migration:run --config ./lib/src/ormconfig.js
Error during migration run:
Error: API Key isn't UUID compliant
at /Users/Documents/0x-api/src/config.ts:751:27
at Array.forEach (<anonymous>)
at assertEnvVarType (/Users/Documents/0x-api/src/config.ts:748:21)
at Object.<anonymous> (/Users/Documents/0x-api/src/config.ts:327:11)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:102:18)
at Object.<anonymous> (/Users/Documents/0x-api/src/ormconfig.ts:3:1)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Steps that made it work:
- yarn add @0x/[email protected] separately
- yarn build
- docker-compose up (this starts the local ganache, postgres and redis instances)
- Change env variable ETHEREUM_RPC_URL to: localhost:8545 instead of ganache:8545
- yarn db:migrate
- yarn start