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

Compiler error on contracts with imports from /contracts #312

Open
elenadimitrova opened this issue Feb 26, 2020 · 1 comment
Open

Compiler error on contracts with imports from /contracts #312

elenadimitrova opened this issue Feb 26, 2020 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@elenadimitrova
Copy link

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

@ochikov ochikov self-assigned this Feb 26, 2020
@ochikov ochikov added the bug Something isn't working label Feb 26, 2020
@ochikov
Copy link
Collaborator

ochikov commented Mar 16, 2020

@elenadimitrova
The issue is fixed and a new version is released -> etherlime@2.3.1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants