-
| 
         When I tried to compile my smart contracts. It gives an error because of the imports. errorCompiling contracts...
  Solc version: 0.6.12
  Optimizer: Enabled  Runs: 200
  EVM Version: Istanbul        
CompilerError: solc returned the following errors:
contracts/Lottery.sol:5:1: ParserError: Source "@chainlink/contracts/src/v0.6/interfaces/AggregatorV3Interface.sol" not found: File outside of allowed directories.
import "@chainlink/contracts/src/v0.6/interfaces/AggregatorV3Interface.sol";
^--------------------------------------------------------------------------^My code below// SPDX-License-Identifier: MIT
pragma solidity ^0.6.6;
import "@chainlink/contracts/src/v0.6/interfaces/AggregatorV3Interface.sol";
contract Lottery {
    address payable[] public players;
    uint256 public usdEntryFee;
    AggregatorV3Interface internal ethUsdPriceFeed;
    constructor(address _priceFeedAddress) public{
        usdEntryFee = 50 * (10 ** 18);
        ethUsdPriceFeed = AggregatorV3Interface(_priceFeedAddress);
        
    }
    function enter() public payable {
        // $50 minimum 
        players.push(msg.sender);
    }
    function getEntranceFee() public view returns (uint256){}
    function startLottery() public{}
    function endLottery() public{}
}
yamldependencies: 
  | 
  
Beta Was this translation helpful? Give feedback.
      
      
          Answered by
          
            cromewar
          
      
      
        Feb 24, 2023 
      
    
    Replies: 3 comments 2 replies
-
| 
         @clintontristan What is the name of your YAML file? Have you named it properly?  | 
  
Beta Was this translation helpful? Give feedback.
                  
                    1 reply
                  
                
            -
| 
         In this code There should be a space between - and '  | 
  
Beta Was this translation helpful? Give feedback.
                  
                    1 reply
                  
                
            -
| 
         Closing this to lack of follow up.  | 
  
Beta Was this translation helpful? Give feedback.
                  
                    0 replies
                  
                
            
      Answer selected by
        cromewar
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Closing this to lack of follow up.