-2

I can't not start my node js on macbook terminal.

The error is:

const runVCR = (name, vcrConfig) => {
^^^^^
SyntaxError: Use of const in strict mode.
    at Module._compile (module.js:439:25)
Panayiotis Georgiou
  • 1,135
  • 3
  • 19
  • 36
  • Clearly it is starting, otherwise it wouldn't be able to try to compile the JS and throw an exception. If you want help debugging your JS then you need to (a) tell us which version of Node you are trying to use and (b) show us an [mcve] – Quentin Mar 20 '17 at 11:10
  • Have you tried googling your error message? E.g. [here](http://stackoverflow.com/questions/22603078/syntaxerror-use-of-const-in-strict-mode) are some info. – ilyaigpetrov Mar 20 '17 at 11:27
  • Do you mean that you get that error just by typing `node` in a terminal and hitting *enter*, before you even have the chance of running your own code? – Álvaro González Mar 20 '17 at 12:38

1 Answers1

0

You need to either upgrade your Node or run the version that you have with the --harmony flag but since the versions of Node that don't support const are so outdated and not supported any more then it is likely that you will get more problems. Upgrade Node to a current version. If you're using 0.10 then there were already Node v0.12, io.js v1.0, io.js v2.0, io.js v3.0, Node v4.0, Node v5.0, Node v6.0, Node v7.0 and we'll have Node v8.0 released in a moment. If you are 8 major versions behind the current version then don't expect it to work at all. It would be like using Windows 3.11 today.

rsp
  • 107,747
  • 29
  • 201
  • 177