BarnBridge / barnbridge-frontend

BarnBridge is a risk tokenizing protocol. It allows hedging yield sensitivity and price volatility by accessing debt pools on other DeFi protocols, and transforming single pools into multiple assets with varying risk/return characteristics.
https://app.barnbridge.com
Apache License 2.0
52 stars 51 forks source link

Failing when trying to Build and run local testnet #504

Open defidev27 opened 2 years ago

defidev27 commented 2 years ago

ENV: node version 16.x Windows 10 - Powershell

Command run: npm run start:testnet

Gives the following errors:

barnbridge-frontend@0.1.0 start:testnet node -r dotenv/config ./node_modules/.bin/react-scripts start dotenv_config_path=.env.testnet.local

D:\Temp\barnbridge-frontend-development\node_modules.bin\react-scripts:2 basedir=$(dirname "$(echo "$0" | sed -e 's,\,/,g')") ^^^^^^^

SyntaxError: missing ) after argument list at Object.compileFunction (node:vm:352:18) at wrapSafe (node:internal/modules/cjs/loader:1031:15) at Module._compile (node:internal/modules/cjs/loader:1065:27) 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 Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) at node:internal/main/run_main_module:17:47

Tried: Deleting node_modules and package-lock.json and rebuilding but gives same error.

wfm-slava commented 2 years ago

You have to create in app folder a file with name ".env.testnet.local" and add this content inside

` PORT = 3000

HTTPS = true

GENERATE_SOURCEMAP = false

SKIP_PREFLIGHT_CHECK = true

REACT_APP_ENV = 'development' `

defidev27 commented 2 years ago

Hi, Thanks for that. I've definately tried that. in fact the .env.sample file has those settings inside.

Unfortunately I'm getting the same error.

barnbridge-frontend@0.1.0 start:testnet node -r dotenv/config ./node_modules/.bin/react-scripts start dotenv_config_path=.env.testnet.local

F:\BarnTest\barnbridge-frontend-development\node_modules.bin\react-scripts:2 basedir=$(dirname "$(echo "$0" | sed -e 's,\,/,g')") ^^^^^^^

SyntaxError: missing ) after argument list at Object.compileFunction (node:vm:352:18) at wrapSafe (node:internal/modules/cjs/loader:1031:15) at Module._compile (node:internal/modules/cjs/loader:1065:27) 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 Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) at node:internal/main/run_main_module:17:47