Skip to content

Error parsing when using default configuration #57

@travs

Description

@travs

When I run ./node_modules/.bin/solidity-coverage after installing in my project, I get the following error.

Launching testrpc on port 8555
Launching test command (this can take a few seconds)...
Using network 'development'.

SyntaxError: Error parsing /home/travis/prg/protocol/coverageEnv/contracts/governance/GovernanceProtocol.sol: Expected "contract", "import", "library", "pragma", "using", comment, end of input, end of line, or whitespace but "e" found. Line: 6, Column: 31
    at peg$buildStructuredError (/usr/local/lib/node_modules/truffle/node_modules/solidity-parser/build/imports_parser.js:543:12)
    at Object.peg$parse [as parse] (/usr/local/lib/node_modules/truffle/node_modules/solidity-parser/build/imports_parser.js:4142:11)
    at Object.parse (/usr/local/lib/node_modules/truffle/node_modules/solidity-parser/index.js:34:23)
    at /usr/local/lib/node_modules/truffle/node_modules/truffle-compile/profiler.js:200:36
    at /usr/local/lib/node_modules/truffle/node_modules/truffle-resolver/index.js:79:5
    at /usr/local/lib/node_modules/truffle/node_modules/truffle-resolver/node_modules/async/internal/onlyOnce.js:12:16
    at next (/usr/local/lib/node_modules/truffle/node_modules/truffle-resolver/node_modules/async/whilst.js:68:18)
    at /usr/local/lib/node_modules/truffle/node_modules/truffle-resolver/index.js:64:7
    at /usr/local/lib/node_modules/truffle/node_modules/truffle-resolver/fs.js:65:5
    at /usr/local/lib/node_modules/truffle/node_modules/truffle-resolver/node_modules/async/internal/once.js:12:16
Cleaning up...

    There was an error generating coverage. Possible reasons include:
    1. Another application is using port 8555
    2. Truffle crashed because your tests errored

  Error: ENOENT: no such file or directory, open './allFiredEvents'
Exiting without generating coverage...

May be worth nothing that there is no configuration stub generated in my truffle.json after this error, which should be there if I understand the readme correctly.

This is almost definitely something wrong on my end though, since it looks like you guys got it to work on the melonport protocol just fine, which is the code that I'm currently trying the coverage tool on.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions