PatrickAlphaC / defi-stake-yield-brownie

77 stars 55 forks source link

Updating front-end not working on first run #4

Closed uleeeeee closed 2 years ago

uleeeeee commented 2 years ago

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.

PatrickAlphaC commented 2 years ago

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

uleeeeee commented 2 years ago

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