why imported link is error although link is already exist in vs code editor?

Problem is Source "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol" not found: File not found. Searched the following locations: "".solidity(6275)

link "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol"

2 Answers 2


You need to specify the exact path to the Chainlink smart contract.

If you want to let this path, then you have to use Foundry, Hardhat or Truffle (for example) and add NodeJS path to the remapping file.


Brownie Solution

You need to update your brownie-config.yaml file to include the dependency you need (in this case, the chainlink contracts).

  # - <organization/repo>@<version>
- smartcontractkit/[email protected]
      - '@chainlink=smartcontractkit/[email protected]'

Once you've updated this file, you can import the contracts in your solidity files. Just make sure that you use the exact prefix specified in the remappings section. For example:

import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol";

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.