BendDAO / bend-lending-protocol

BendDAO Lending Protocol for Web3 Data Liquidity
Other
127 stars 55 forks source link

Error running yarn install inside docker container #40

Open mrthankyou opened 2 years ago

mrthankyou commented 2 years ago

Describe the bug When running yarn install inside the docker container, the following error is produced:

contracts-env_1  | [4/4] Building fresh packages...
contracts-env_1  | error /src/node_modules/@chainlink/contracts: Command failed.
contracts-env_1  | Exit code: 1
contracts-env_1  | Command: node -e "if(process.env.npm_execpath.indexOf('yarn') === -1) throw new Error('Please use yarn to install dependencies\n\n')"
contracts-env_1  | Arguments: 
contracts-env_1  | Directory: /src/node_modules/@chainlink/contracts
contracts-env_1  | Output:
contracts-env_1  | [eval]:1
contracts-env_1  | if(process.env.npm_execpath.indexOf('yarn') === -1) throw new Error('Please use yarn to install dependencies\n\n')
contracts-env_1  |                                                     ^
contracts-env_1  | 
contracts-env_1  | Error: Please use yarn to install dependencies
contracts-env_1  | 
contracts-env_1  | 
contracts-env_1  |     at [eval]:1:59
contracts-env_1  |     at Script.runInThisContext (node:vm:129:12)
contracts-env_1  |     at Object.runInThisContext (node:vm:305:38)
contracts-env_1  |     at node:internal/process/execution:76:19
contracts-env_1  |     at [eval]-wrapper:6:22
contracts-env_1  |     at evalScript (node:internal/process/execution:75:60)
contracts-env_1  |     at node:internal/main/eval_string:27:3
contracts-env_1  | info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

To Reproduce Steps to reproduce the behavior:

  1. Clone repo.
  2. Create empty .env file.
  3. Run docker-compose up
  4. Run docker-compose exec contracts-env bash
  5. Run yarn install inside the docker container.

Expected behavior No errors and installation should be successful.

Screenshots N/A

Desktop (please complete the following information):

Smartphone (please complete the following information): N/A

Additional context N/A

mrthankyou commented 2 years ago

I have discovered the problem. It appears that chainlink has a broken dependency. Updating it to chainlink 0.3.1 in package.json resolved the issue. I also was sure to fill out the .env file with the appropriate keys (I left that blank in my initial testing).

I can submit a PR for a change in the package.json if you would like. Just let me know. Thanks.

thorseldon commented 2 years ago

Yes, PR is welcome, pls submit your code.