FHIR Chat · Installing and running cql-execution framework · cql

Stream: cql

Topic: Installing and running cql-execution framework


view this post on Zulip Georg Fette (Aug 27 2018 at 09:09):

Hello, I try to install and run the CQL execution framework (https://github.com/cqframework/cql-execution). I installed the current versions of Node.js, Yarn and CoffeeScript. I am using a Windows 7. I get an exception during the install:

D:\Code\DW\cql-execution>yarn install
yarn install v1.9.4
[1/4] Resolving packages...
success Already up-to-date.
$ ./node_modules/.bin/cake build && ./node_modules/.bin/cake build-cql4browsers
events.js:183
throw er; // Unhandled 'error' event
^

Error: spawn coffee ENOENT
at _errnoException (util.js:992:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:190:19)
at onErrorNT (internal/child_process.js:372:16)
at _combinedTickCallback (internal/process/next_tick.js:138:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
at Function.Module.runMain (module.js:695:11)
at startup (bootstrap_node.js:191:16)
at bootstrap_node.js:612:3

error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.

When running "cake build-cql4browsers" I get this exception:

D:\Code\DW\cql-execution>cake build-cql4browsers
Browserifing cql4browsers...
events.js:183
throw er; // Unhandled 'error' event
^

Error: Cannot find module 'D:\Code\DW\cql-execution\lib\example\browser\simple-browser-support.js' from 'D:\Code\DW\cql-execution'
at D:\Code\DW\cql-execution\node_modules\browser-resolve\node_modules\resolve\lib\async.js:55:21
at load (D:\Code\DW\cql-execution\node_modules\browser-resolve\node_modules\resolve\lib\async.js:69:43)
at onex (D:\Code\DW\cql-execution\node_modules\browser-resolve\node_modules\resolve\lib\async.js:92:31)
at D:\Code\DW\cql-execution\node_modules\browser-resolve\node_modules\resolve\lib\async.js:22:47
at FSReqWrap.oncomplete (fs.js:152:21)

The folder "D:\Code\DW\cql-execution\lib" does not exist (yet?) on my system. Has a previous step already failed that should have created this folder and the content within? Perhaps the CoffeeScript installation/call had a problem.

When running "coffee cql.coffee" from the "src" folder I get this error:

D:\Code\DW\cql-execution\src>coffee cql.coffee
D:\Code\DW\cql-execution\src\elm\expression.coffee:32:9: error: unexpected indentation
super

I do not have experience in CoffeScript and JavaScript, so perhaps my debugging information above is of no use at all. What could I do to give more information on the source of the problem ?
Greetings

view this post on Zulip Bryn Rhodes (Aug 27 2018 at 14:28):

@Chris Moesel?

view this post on Zulip Chris Moesel (Aug 27 2018 at 14:59):

@Georg Fette -- I've not seen this before, but I wonder if it is due to the node version. We test using Node 8.x, but I'm guessing you probably installed Node 10.x (as the instructions are not at all specific). Could you try downgrading to Node 8.x to see if that makes a difference? I've seen several projects that don't do well under Node 10.

view this post on Zulip Georg Fette (Aug 28 2018 at 08:35):

@Chris Moesel I did install version 8.11.4 because it was described as "recommended for most users" on the node.js website. Has the installation of the cql execution framework already succeeded on a Windows system? I read about problems with coffeescript execution on Windows systems because of sub process spawning problems. It looks like the "cql-execution\lib\" folder is not being created in which the .js files are stored created by the coffeescript processes. Is there a way to start the .coffee->.js transformations manually?

view this post on Zulip Chris Moesel (Aug 28 2018 at 18:26):

@Georg Fette -- I apologize for the trouble. I expect that it has to do with our prepublish command in the package.json. We're using && to execute two commands in sequence -- but I bet Windows isn't happy with that. Let me see if I can find a Windows-friendly alternative. Stand by.

view this post on Zulip Chris Moesel (Aug 28 2018 at 18:30):

Actually -- after some Googling it seems like && should be supported in Windows. Hmm...

view this post on Zulip Chris Moesel (Aug 28 2018 at 18:39):

It seems there may be a problem with launching child processes through these scripts in windows. Here are a few things to try:

view this post on Zulip Chris Moesel (Aug 28 2018 at 18:40):

First, try running cake build. If that works, it should create the lib folder and then you'll be able to run cake build-cql4browsers.

view this post on Zulip Chris Moesel (Aug 28 2018 at 18:41):

If that doesn't work, try editing the Cakefile on line 11 from:

  coffee = spawn 'coffee', args

to

  coffee = spawn 'coffee.cmd', args

view this post on Zulip Georg Fette (Aug 28 2018 at 18:44):

yeah, that did it ! Thank you !

view this post on Zulip Chris Moesel (Aug 28 2018 at 19:17):

Great! For future reference, what did it? Running cake build on its own or editing that line in the Cakefile?

view this post on Zulip Georg Fette (Aug 28 2018 at 19:27):

the change of the line in the cakefile


Last updated: Apr 12 2022 at 19:14 UTC