Reputation: 1
Every time my team tries to implement something in node.js, this is what happens, any ideas as to how we should go about fixing it? - note that we are new to node
$ npm install express --save
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:427:12)
at emitOne (events.js:95:20)
at REPLServer.emit (events.js:182: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)
Upvotes: 0
Views: 757
Reputation: 1820
Just type into your Command Prompt (cmd).
npm install express --save
Upvotes: 0
Reputation: 65116
You're not supposed to type npm
commands into the Node REPL. That's for typing JavaScript into.
Type the npm
commands directly into your shell.
Oh, and you're not supposed to type the $
either. That just represents the common shell prompt.
Upvotes: 6