PatrickAlphaC / defi-stake-yield-brownie

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Updating front-end not working on first run

uleeeeee opened this issue · comments

After cloning this repo and running brownie run scripts/deploy.py, it fails due to the:

Updating front end...
  File "brownie/_cli/run.py", line 50, in main
    return_value, frame = run(
  File "brownie/project/scripts.py", line 103, in run
    return_value = f_locals[method_name](*args, **kwargs)
  File "./scripts/deploy.py", line 95, in main
    deploy_token_farm_and_dapp_token(update_front_end_flag=True)
  File "./scripts/deploy.py", line 39, in deploy_token_farm_and_dapp_token
    update_front_end()
  File "./scripts/deploy.py", line 67, in update_front_end
    copy_files_to_front_end(
  File "./scripts/deploy.py", line 91, in copy_files_to_front_end
    shutil.copyfile(src, dest)
  File "/usr/lib/python3.9/shutil.py", line 265, in copyfile
    with open(src, 'rb') as fsrc, open(dst, 'wb') as fdst:
FileNotFoundError: [Errno 2] No such file or directory: './build/deployments/map.json'
Terminating local RPC client...

By editing /scripts/deploy.py to:

def main():
    deploy_token_farm_and_dapp_token(update_front_end_flag=False)

I can run it, but it is not exporting map.json to that specified './build/deployments/map.json' directory.

What network did you deploy to? Right now it only works when deploying to a testnet or mainnet

I was trying ropsten/rinkeby. Now I tried the Kovan and it works perfectly, thanks!