Getting compilation failed error, while running solidity-coverage. Truffle compile is working fine.
Here is my truffle config:
module.exports = {
networks: {
coverage: {
host: '127.0.0.1',
network_id: 5777,
port: 8555,
gas: 0xfffffffffff,
gasPrice: 0x01
},
},
compilers: {
solc: {
version: '0.5.10',
settings: {
optimizer: {
enabled: true,
runs: 200
}
}
}
},
plugins: ["solidity-coverage"]
};
.solcover.js
:
module.exports = {
port: 8555,
norpc: true,
deepSkip: true,
compileCommand: '../node_modules/.bin/truffle compile',
testCommand: 'node --max-old-space-size=4096 ../node_modules/.bin/truffle test --network coverage',
skipFiles: [
'imports',
'EventCaller.sol',
'dummyDaiFeed.sol',
'mocks'
],
forceParse: [
'imports/ERC1132',
'mocks'
]
};
Command used to run coverage: node_modules/.bin/solidity-coverage
Getting this error only while running coverage:
* Line 1, Column 1
Syntax error: value, object or array expected.
* Line 1, Column 2
Extra non-whitespace after JSON value.
Compilation failed. See above.
Error occurred during the compilation after the instrumentation was completed.