What happened:
try to run demo as steps shown in README.md, however, pnpm run build in root dir doesn't work. and after executing npm run dev:qa, there are some errors
What you expected to happen: expect it runs successfully
Have you tried the latest version: yes
How to reproduce it (as minimally and precisely as possible):
clone repo
in project root directory, execute pnpm run build, this step fails.
go into examples/wallet, cp .env.simple .env.test.local below is the content of .env.test.local
- run `npm run dev:qa`, and visit `http://localhost:3000/wallet`, error display as below
![image](https://user-images.githubusercontent.com/7901126/236400840-161c188c-55d6-4592-a2bd-09e94303fbe5.png)
**Logs (paste a small part showing an error (< 10 lines) or link a pastebin, gist, etc. containing more of the log file)**:
wallet > alpha: npm run dev:qa
@demo/wallet@0.0.2-alpha.0 dev:qa
cross-env NODE_ENV=test next dev
ready - started server on 0.0.0.0:3000, url: http://localhost:3000
info - Loaded env from /Users/Azleal-Mac/Documents/workstation/github-workspace/greenfield-js-sdk/examples/wallet/.env.test.local
event - compiled client and server successfully in 580 ms (396 modules)
wait - compiling /_error (client and server)...
wait - compiling /wallet (client and server)...
error - ./src/client/index.ts:2:0
Module not found: Can't resolve '@bnb-chain/greenfield-chain-sdk'
1 | import { GRPC_URL } from '@/config';
2 | import { makeRpcClient } from '@bnb-chain/greenfield-chain-sdk';
3 | import Long from 'long';
4 | import { QueryClientImpl as spQueryClientImpl } from '@bnb-chain/greenfield-cosmos-types/greenfield/sp/query';
5 | import { QueryClientImpl as storageQueryClientImpl } from '@bnb-chain/greenfield-cosmos-types/greenfield/storage/query';
Import trace for requested module:
./src/components/object/info/index.tsx
./src/components/object/index.tsx
./src/pages/wallet.tsx
SDK version: alpha
Environment:
What happened: try to run demo as steps shown in README.md, however,
pnpm run build
in root dir doesn't work. and after executingnpm run dev:qa
, there are some errorsWhat you expected to happen: expect it runs successfully
Have you tried the latest version: yes
How to reproduce it (as minimally and precisely as possible):
pnpm run build
, this step fails.examples/wallet
,cp .env.simple .env.test.local
below is the content of.env.test.local
NEXT_PUBLIC_GREENFIELD_RPC_URL=https://gnfd-testnet-ethapi-us.bnbchain.org NEXT_PUBLIC_GREEN_CHAIN_ID=5600
BSC End POINT
NEXT_PUBLIC_BSC_RPC_URL=https://gnfd-bsc-testnet-dataseed1.bnbchain.org NEXT_PUBLIC_BSC_CHAIN_ID=5601
NEXT_PUBLIC_TOKEN_HUB_CONTRACT_ADDRESS=0x10C6E9530F1C1AF873a391030a1D9E8ed0630D26 NEXT_PUBLIC_CROSS_CHAIN_CONTRACT_ADDRESS=0xeEBe00Ac0756308ac4AaBfD76c05c4F3088B8883
wallet > alpha: npm run dev:qa
ready - started server on 0.0.0.0:3000, url: http://localhost:3000 info - Loaded env from /Users/Azleal-Mac/Documents/workstation/github-workspace/greenfield-js-sdk/examples/wallet/.env.test.local event - compiled client and server successfully in 580 ms (396 modules) wait - compiling /_error (client and server)... wait - compiling /wallet (client and server)... error - ./src/client/index.ts:2:0 Module not found: Can't resolve '@bnb-chain/greenfield-chain-sdk' 1 | import { GRPC_URL } from '@/config';
Import trace for requested module: ./src/components/object/info/index.tsx ./src/components/object/index.tsx ./src/pages/wallet.tsx
https://nextjs.org/docs/messages/module-not-found
TESTNET
NEXT_PUBLIC_GRPC_URL=https://gnfd-testnet-fullnode-tendermint-us.bnbchain.org
NEXT_PUBLIC_GREENFIELD_RPC_URL=https://gnfd-testnet-ethapi-us.bnbchain.org NEXT_PUBLIC_GREEN_CHAIN_ID=5600
BSC End POINT
NEXT_PUBLIC_BSC_RPC_URL=https://gnfd-bsc-testnet-dataseed1.bnbchain.org NEXT_PUBLIC_BSC_CHAIN_ID=5601
NEXT_PUBLIC_TOKEN_HUB_CONTRACT_ADDRESS=0x10C6E9530F1C1AF873a391030a1D9E8ed0630D26 NEXT_PUBLIC_CROSS_CHAIN_CONTRACT_ADDRESS=0xeEBe00Ac0756308ac4AaBfD76c05c4F3088B8883