functionalfoundry / ethereum-htlc

HTLC for doing cross-chain atomic swaps
MIT License
7 stars 2 forks source link

SyntaxError: missing ) after argument list #8

Closed drandreaskrueger closed 6 years ago

drandreaskrueger commented 6 years ago

after solving that and that issue (so still identical setup & versions) ... I have a new problem:

truffle test

Compiling ./contracts/HTLC.sol...
Compiling ./contracts/Migrations.sol...
Compiling zeppelin-solidity/contracts/ReentrancyGuard.sol...

Compilation warnings encountered:  
[ ... warnings omitted ...]

.../ethereum-htlc/test/htlc.js:48
contract('HTLC', async accounts => {
                 ^^^^^

SyntaxError: missing ) after argument list
    at createScript (vm.js:56:10)
    at Object.runInThisContext (vm.js:97:10)
    at Module._compile (module.js:542:28)
    at Object.Module._extensions..js (module.js:579:10)
    at Module.load (module.js:487:32)
    at tryModuleLoad (module.js:446:12)
    at Function.Module._load (module.js:438:3)
    at Module.require (module.js:497:17)
    at require (internal/module.js:20:19)
    at /usr/lib/node_modules/truffle/node_modules/mocha/lib/mocha.js:231:27
drandreaskrueger commented 6 years ago

https://github.com/functionalfoundry/ethereum-htlc/blob/a15185713b451f33a71afcc77c65616f60054c3e/test/htlc.js#L48-L49

drandreaskrueger commented 6 years ago

Hah.

Found the problem, and it was on my side. npm/node version issue, again. Sorry, I am by no means a JS expert.

Anyone else running into the same problem, here's a solution:

sudo npm cache clean -f
sudo npm install -g n
sudo n stable

npm --version; node --version; truffle version; testrpc version | grep TestRPC
5.5.1
v9.0.0
Truffle v4.0.1 (core: 4.0.1)
Solidity v0.4.18 (solc-js)
EthereumJS TestRPC v6.0.1 (ganache-core: 2.0.0)