raineorshine / solidity-repl

Ethereum Solidity REPL
ISC License
396 stars 33 forks source link

Requires index.js to launch solr #4

Closed ebadiere closed 6 years ago

ebadiere commented 8 years ago

Following the instructions:

npm install -g solidity-repl

A bunch of stuff is installed ending with:

p256k1/build' CXX(target) Release/obj.target/scrypt/src/node-boilerplate/scrypt_hash_sync.o CXX(target) Release/obj.target/scrypt/src/node-boilerplate/scrypt_hash_async.o CXX(target) Release/obj.target/scrypt/scrypt_node.o SOLINK_MODULE(target) Release/obj.target/scrypt.node SOLINK_MODULE(target) Release/obj.target/scrypt.node: Finished COPY Release/scrypt.node make: Leaving directory `/usr/local/lib/node_modules/solidity-repl/node_modules/ethereumjs-testrpc/node_modules/ethereumjs-wallet/node_modules/scrypt.js/node_modules/scrypt/build' /usr/local/bin/solr -> /usr/local/lib/node_modules/solidity-repl/bin.js solidity-repl@0.2.0 /usr/local/lib/node_modules/solidity-repl ├── promise.waterfall@3.1.4 ├── eth-new-contract@0.1.0 ├── bluebird@3.4.1 ├── solc@0.3.5 (require-from-string@1.2.0, memorystream@0.3.1) ├── web3@0.17.0-alpha (utf8@2.1.1, xmlhttprequest@1.8.0, bignumber.js@2.0.7, crypto-js@3.1.6) └── ethereumjs-testrpc@2.1.0 (async@1.5.2, bignumber.js@2.4.0, seedrandom@2.4.2, shelljs@0.6.0, ethereumjs-account@2.0.4, yargs@3.32.0, bip39@2.2.0, ethereumjs-tx@1.1.2, ethereumjs-block@1.2.2, ethereumjs-vm@1.4.1, merkle-patricia-tree@2.1.2, ethereumjs-util@4.5.0, ethereumjs-wallet@0.6.0, web3@0.16.0, web3-provider-engine@7.8.6)

I then try to run "solr" and get the output below:

eric@eric-Intense-PC ~ $ solr

/usr/local/lib/node_modules/solidity-repl/bin.js:4 const Repl = require('./index.js') ^^^^^ SyntaxError: Use of const in strict mode. at Module._compile (module.js:439:25) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Function.Module.runMain (module.js:497:10) at startup (node.js:119:16) at node.js:902:3

Crypt0-Bear commented 7 years ago

I also am having that issue. If I have time this weekend I'll dive into the code and see what is going on

raineorshine commented 6 years ago

I think this is due to having an outdated version of node.

See https://stackoverflow.com/questions/22603078/syntaxerror-use-of-const-in-strict-mode