Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error running yarn install inside docker container #40

Open
mrthankyou opened this issue May 22, 2022 · 2 comments
Open

Error running yarn install inside docker container #40

mrthankyou opened this issue May 22, 2022 · 2 comments

Comments

@mrthankyou
Copy link

mrthankyou commented May 22, 2022

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):

  • OS: MacOS 12.4
  • Browser: N/A
  • Version: N/A

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

Additional context
N/A

@mrthankyou mrthankyou changed the title Error running tests inside docker container Error running yarn install inside docker container May 23, 2022
@mrthankyou
Copy link
Author

mrthankyou commented May 25, 2022

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
Copy link
Contributor

Yes, PR is welcome, pls submit your code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants