Hi folks. I'm trying to run through the first tutorial "Create an OpenAPI Specification". When I try to start the server with $node index.js, I'm getting the error
Unexpected token 'index.js' in expression or statement.At line:1 char:15+ $node index.js <<<< + CategoryInfo : ParserError: (index.js:String) [], ParentContainsErrorRecordException + FullyQualifiedErrorId : UnexpectedToken
I'm not very experienced with node.js. I copied the code for index.js directly from the tutorial. Any help? Thanks!
Solved! Go to Solution.
Yep, sorry.. . .
I think you do not need to type the leading $.
The $ is often the command prompt in your bash (or other shell) terminal .
I don;'t know why they left the $ in that partuicular command.
it's wrong.
just use
node ./index.js
Yep, sorry.. . .
I think you do not need to type the leading $.
The $ is often the command prompt in your bash (or other shell) terminal .
I don;'t know why they left the $ in that partuicular command.
it's wrong.
just use
node ./index.js
That was it! I suspected it might have something to do with that, but as I said, I'm new to node.js. Thanks.
User | Count |
---|---|
1 | |
1 | |
1 | |
1 | |
1 |