Skip to content
This repository was archived by the owner on Aug 5, 2021. It is now read-only.
This repository was archived by the owner on Aug 5, 2021. It is now read-only.

Compiler error on contracts with imports from /contracts #312

Description

@elenadimitrova

Compiling contracts which live outside the /contracts folder but have imports from there fails with:

{ Error: lib/maker/SaiTub.sol:25:1: ParserError: Source "contracts/exchange/ERC20.sol" not found: File import callback not supported
import "../../contracts/exchange/ERC20.sol";
^------------------------------------------^
    at new ExtendableError (/argent-contracts/node_modules/etherlime/cli-commands/compiler/etherlime-error/index.js:7:19)
    at new CompileError (/argent-contracts/node_modules/etherlime/cli-commands/compiler/etherlime-compile/compile-error.js:11:5)
    at Promise (/argent-contracts/node_modules/etherlime/cli-commands/compiler/etherlime-compile/index.js:81:18)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:189:7)
    at Function.Module.runMain (module.js:696:11)
    at findNodeScript.then.existing (/Users/Elena/.nvm/versions/node/v8.12.0/lib/node_modules/npm/node_modules/libnpx/index.js:268:14)
    at <anonymous>
  message: 'lib/maker/SaiTub.sol:25:1: ParserError: Source "contracts/exchange/ERC20.sol" not found: File import callback not supported\nimport "../../contracts/exchange/ERC20.sol";\n^------------------------------------------^\n\u001b[31mCompilation failed. See above.\u001b[39m',
  stack: 'Error: lib/maker/SaiTub.sol:25:1: ParserError: Source "contracts/exchange/ERC20.sol" not found: File import callback not supported\nimport "../../contracts/exchange/ERC20.sol";\n^------------------------------------------^\n    at new ExtendableError (/argent-contracts/node_modules/etherlime/cli-commands/compiler/etherlime-error/index.js:7:19)\n    at new CompileError (/argent-contracts/node_modules/etherlime/cli-commands/compiler/etherlime-compile/compile-error.js:11:5)\n    at Promise (/argent-contracts/node_modules/etherlime/cli-commands/compiler/etherlime-compile/index.js:81:18)\n    at <anonymous>\n    at process._tickCallback (internal/process/next_tick.js:189:7)\n    at Function.Module.runMain (module.js:696:11)\n    at findNodeScript.then.existing (/.nvm/versions/node/v8.12.0/lib/node_modules/npm/node_modules/libnpx/index.js:268:14)\n    at <anonymous>',
  name: 'CompileError' }

You can reproduce with the following file system setup:
/contracts
/tokens
ERC20.sol
/lib
TestContract.sol

where TestContract imports ../contracts/tokens/ERC20.sol

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions