postmanlabs / newman

Newman is a command-line collection runner for Postman
https://www.postman.com
Apache License 2.0
6.88k stars 1.16k forks source link

Not able to run newman command, getting error on Ubuntu 14.04 #1526

Closed abhishekprsetty closed 6 years ago

abhishekprsetty commented 6 years ago
  1. Newman Version (can be found via newman -v): On executing this command, getting error: usr/local/lib/nodemodules/newman/bin/newman.js:235 .forEach(reporters, (reporter) => { parsed[reporter] = {}; }); ^ SyntaxError: Unexpected token > at Module._compile (module.js:439:25) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Function.Module.runMain (module.js:497:10) at startup (node.js:119:16) at node.js:902:3

  2. OS details (type, version, and architecture): Ubuntu 14.04

  3. Are you using Newman as a library, or via the CLI? Using via CLI

  4. Did you encounter this recently, or has this bug always been there: I have just installed node and npm and trying to run the command of newman newman run Ingestion.postman_collection.json -e env.json node -v v0.10.25

npm -v 1.3.10

  1. Expected behaviour: Should be able to run the tests but its throwing on error: /usr/local/lib/nodemodules/newman/bin/newman.js:235 .forEach(reporters, (reporter) => { parsed[reporter] = {}; }); ^ SyntaxError: Unexpected token > at Module._compile (module.js:439:25) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32) at Function.Module._load (module.js:312:12) at Function.Module.runMain (module.js:497:10) at startup (node.js:119:16) at node.js:902:3

  2. Command / script used to run Newman: newman run Ingestion.postman_collection.json -e env.json : Both the files are present in the same path

  3. Sample collection, and auxiliary files (minus the sensitive details): any sample json also I am not able to run

    screen shot 2018-05-09 at 1 35 09 pm
  4. Screenshots (if applicable):

Steps to reproduce the problem:

  1. After installing node and npm , I have installed newman following this link:https://www.getpostman.com/docs/v6/postman/collection_runs/command_line_integration_with_newman

on running above command getting the error please help

kunagpal commented 6 years ago

@abhishekprsetty Newman does not support versions of Node below v4, you'll have to upgrade your Node version to at-least the latest v4.x release, which is v4.9.1 at the time of writing.

abhishekprsetty commented 6 years ago

Yes on upgrading it. Worked fine thanks 👍