Hi, I'm trying to install Grunt with Node.js using this command and this is my first time using Node or Grunt so take it slow :-)

 $ npm install -g grunt-cli

Each time I try to run the above code I get this error; I've searched online for the answer and there are plenty of links to the answer but I couldn't find my answer especially for a newbie at Node ?

SyntaxError: Unexpected identifier
    at Object.exports.createScript (vm.js:24:10)
    at REPLServer.defaultEval (repl.js:235:25)
    at bound (domain.js:287:14)
    at REPLServer.runBound [as eval] (domain.js:300:12)
    at REPLServer.<anonymous> (repl.js:431:12)
    at emitOne (events.js:82:20)
    at REPLServer.emit (events.js:169:7)
    at REPLServer.Interface._onLine (readline.js:211:10)
    at REPLServer.Interface._line (readline.js:550:8)
    at REPLServer.Interface._ttyWrite (readline.js:827:14)

Recommended Answers

All 2 Replies

Are you sure all your related code is up-to-date and/or in sync with the version of grunt that you are trying to install?
Also, you need to make sure that appropriate path environment variables are set correctly so the system can find the associated components required.

That what you ask rubberman, I'm not aware of, how can I verify these steps ?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.