/usr/local/lib/node_modules/truffle/lib/init.js:5
all(config, callback) {
^
SyntaxError: Unexpected token (
at Module._compile (module.js:439:25)
at Module._extensions..js (module.js:474:10)
at Object.require.extensions.(anonymous function) as .js
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
at Module.require (module.js:364:17)
at require (module.js:380:17)
at Object.
at Module._compile (module.js:456:26)
at Module._extensions..js (module.js:474:10)
Very interesting. I think I know the issue, but not sure why it'd be fine in other contexts.
Can you tell me which version of Node you're running?
Im currently running the geth node
@Akiiki Right, but what is your NodeJS version?
$ node --version
version v0.10.25
Ah, can you upgrade to Node v5.x? See here: https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions
Sweet!! Thanks it worked.....One more question why is it better to use ethereumjs-testrpc when developing dApps?
It's so much faster. When developing using geth, you have to wait for transactions to mine which take at worst an average of 17 seconds and at best 2 to 4 seconds if you're on a private geth node and mining on your machine. If the latter, and you're on a laptop, your fingers will burn off. :) The testrpc, on the other hand, circumvents the need for mining and processes your transactions immediately, as if you have an ethereum network made solely for you. This makes it so when you press a button on your dapp that triggers a transaction, the transaction processes immediately and you get quick feedback on whether or not your code works as you expect. This also goes for automated tests, speeding them up significantly. Lastly, accounts on the testrpc come pre-filled with Ether so you don't have to worry about setting up accounts yourself or mining for test Ether.
Once you're done developing on the testrpc, that's when you go try your code on a local private geth node just to be sure everything's works well there. Once it does, you can now be certain when you finally deploy your code to your "production" network (the public ethereum network, or your consortium private network, etc.) you can be sure it'll work.
So in short: Speeds up development significantly, so you only have to focus on building your dapp. And you don't have to mess with account configuration during development.
I'm going to close this as it looks like you got your issue fixed! Cheers!
check this to upgarde your node version
https://stackoverflow.com/questions/41195952/updating-nodejs-on-ubuntu-16-04
Most helpful comment
Ah, can you upgrade to Node v5.x? See here: https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions