0x
API 密鑰不符合 UUID 錯誤
我正在嘗試測試本地 0x-api。當我這樣做時,
yarn test
我沒有收到任何錯誤。當我這樣做或yarn start
出現錯誤時:。我只更改了文件。yarn db:migrate``Error: API Key isn't UUID compliant``.env
追溯:
/home/roman/0x-api-folder/0x-api/src/config.ts:679 apiKeys.forEach((apiKey) => { ^ Error: API Key isn't UUID compliant at /home/roman/0x-api-folder/0x-api/src/config.ts:682:27 at Array.forEach (<anonymous>) at assertEnvVarType (/home/roman/0x-api-folder/0x-api/src/config.ts:679:21)
執行後我也遇到了同樣的錯誤:
Yarn install Yarn build.
嘗試執行“yarn db:migrate”時遇到此執行緒提到的錯誤
堆棧跟踪:
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.
使其工作的步驟:
- yarn 分別添加@0x/neon-router@0.3.1
- 紗線建構
- docker-compose up(這會啟動本地 ganache、postgres 和 redis 實例)
- 將環境變數 ETHEREUM_RPC_URL 更改為:localhost:8545 而不是 ganache:8545
- 紗線數據庫:遷移
- 紗線開始
你有更多可用的堆棧跟踪嗎?
嘗試設置
RFQT_API_KEY_WHITELIST_JSON=[] PLP_API_KEY_WHITELIST_JSON=[]