rbren / fhir-swagger

Generate Swagger from a FHIR conformance profile
MIT License
61 stars 32 forks source link

Error while executing command #1

Closed cladius closed 7 years ago

cladius commented 8 years ago

I encountered the below error while executing the sample command:

fhir-swagger \
> --fhir_url http://argonaut.healthintersections.com.au/open \
> --conformance_path="/metadata?_format=application/json" \
> --output swagger.json
...../lib/node_modules/fhir-swagger/lib/conformance-to-swagger.js:46
    var interactions = res.interaction.map(s => s.code);
                                              ^
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 Module.require (module.js:364:17)
    at require (module.js:380:17)
    at Object.<anonymous> (...../lib/node_modules/fhir-swagger/index.js:2:17)
    at Module._compile (module.js:456:26)
    at Object.Module._extensions..js (module.js:474:10)
    at Module.load (module.js:356:32)

Any pointers?

rbren commented 8 years ago

Hey, sorry about that. I've been using ES6 syntax, which was added in NodeJS 4.0 - sounds like you're running something earlier.

Can you run "node -v" to check? I'll add a note to the README as well.

Bobby Brennan bobby.brennan@gmail.com

On Tue, Mar 29, 2016 at 3:53 PM, Cladius Fernando notifications@github.com wrote:

I encountered the below error while executing the sample command:

fhir-swagger \

--fhir_url http://argonaut.healthintersections.com.au/open \ --conformance_path="/metadata?_format=application/json" \ --output swagger.json

...../lib/node_modules/fhir-swagger/lib/conformance-to-swagger.js:46 var interactions = res.interaction.map(s => s.code); ^ 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 Module.require (module.js:364:17) at require (module.js:380:17) at Object. (/home/cladius/PSL/Lab/nodejsRoot/lib/node_modules/fhir-swagger/index.js:2:17) at Module._compile (module.js:456:26) at Object.Module._extensions..js (module.js:474:10) at Module.load (module.js:356:32)

Any pointers?

— You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub https://github.com/bobby-brennan/fhir-swagger/issues/1

cladius commented 8 years ago

Upgrading node resolved the issue. Thanks Bobby! Nice module.