This React app was initialized with create-near-app
To run this project locally:
-
Prerequisites: Make sure you've installed Node.js ≥ 12
-
Install dependencies:
yarn install
-
Export TOKEN_CONTRACT
export FT_CONTRACT_NAME="lnc.factory.tokenhub.testnet"
modify
src/.env
file with FT_CONTRACT_NAME="lnc.factory.tokenhub.testnet" -
Go to
src/config.js
and comment all FT_CONTRACT .env declarations//from this const FT_CONTRACT = process.env.FT_CONTRACT_NAME || 'lnc.factory.tokenhub.testnet', ftContractName: FT_CONTRACT, ... //to this //const FT_CONTRACT = process.env.FT_CONTRACT_NAME || 'lnc.factory.tokenhub.testnet', //ftContractName: FT_CONTRACT,
-
Run
yarn start
-
Then uncomment lines in config.js and save it. Go to
src/config.js
and uncomment all FT_CONTRACT .env declarations//from this //const FT_CONTRACT = process.env.FT_CONTRACT_NAME || 'lnc.factory.tokenhub.testnet', //ftContractName: FT_CONTRACT, ... //to this const FT_CONTRACT = process.env.FT_CONTRACT_NAME || 'lnc.factory.tokenhub.testnet', ftContractName: FT_CONTRACT,
This actions with comment/uncomment lines needs for easily run server on localhost with yarn start
.
If we don't comment this lines it may be conflict between neardev-env and .env with FT_CONTRACT.
On Windows, if you're seeing an error containing EPERM
it may be related to spaces in your path. Please see this issue for more details.