Trouble getting REPL to work from runway-compiler repo

38 views
Skip to first unread message

Andrew Helwer

unread,
Jun 26, 2016, 4:47:50 PM6/26/16
to runway-dev
I cloned the runway-compiler repo from https://github.com/salesforce/runway-compiler. I'm on Windows 10, running node 4.4.6 and npm 2.15.5. I apologize if the error is obvious, I've never before used node.

When running node .\bin\main.js, I get the following error:

C:\Users\ahelwer\Source\GitHub\runway-compiler\lib\pubsub.js:30
        results.push(handler(...arguments));
                             ^^^

SyntaxError: Unexpected token ...
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:373:25)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (C:\Users\ahelwer\Source\GitHub\runway-compiler\lib\wo
rkspace.js:15:14)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)


Here is the output from when I previously ran npm install:

C:\Users\ahelwer\Source\GitHub\runway-compiler>npm install
npm WARN deprecated ja...@0.26.3: Jade has been renamed to pug, please install th
e latest version of pug instead of jade
npm WARN deprecated mini...@0.3.0: Please update to minimatch 3.0.2 or higher
to avoid a RegExp DoS issue
perform...@0.2.0 node_modules\performance-now

doc...@0.6.2 node_modules\docopt

pars...@0.7.1 node_modules\parsimmon

mo...@2.5.3 node_modules\mocha
├── escape-str...@1.0.2
├── comm...@2.3.0
├── di...@1.4.0
├── support...@1.2.0
├── gr...@1.9.2
├── to-iso...@0.0.2
├── de...@2.2.0 (m...@0.7.1)
├── mkd...@0.5.1 (mini...@0.0.8)
├── gl...@3.2.11 (inhe...@2.0.1, mini...@0.3.0)
└── ja...@0.26.3 (comm...@0.6.1, mkd...@0.3.0)

lod...@4.13.1 node_modules\lodash


Also, not sure if it's related but currently the Travis CI build is failing for the runway-compiler repo. Thanks for any help!

Andrew

Andrew Helwer

unread,
Jun 26, 2016, 4:58:51 PM6/26/16
to runway-dev
Also, npm test gives the following output:

C:\Users\ahelwer\Source\GitHub\runway-compiler\bin>npm test

> runway-...@0.1.0 test C:\Users\ahelwer\Source\GitHub\runway-compiler
> mocha; ./test-parser/runtests.sh

C:\Users\ahelwer\Source\GitHub\runway-compiler\node_modules\mocha\lib\utils.js:6
34
        throw new Error("cannot resolve path (or pattern) '" + path + "'");
        ^

Error: cannot resolve path (or pattern) ';'
    at Object.lookupFiles (C:\Users\ahelwer\Source\GitHub\runway-compiler\node_m
odules\mocha\lib\utils.js:634:15)
    at C:\Users\ahelwer\Source\GitHub\runway-compiler\node_modules\mocha\bin\_mo
cha:327:30
    at Array.forEach (native)
    at Object.<anonymous> (C:\Users\ahelwer\Source\GitHub\runway-compiler\node_m
odules\mocha\bin\_mocha:326:6)

    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Function.Module.runMain (module.js:441:10)
    at startup (node.js:139:18)
    at node.js:968:3
 npm ERR! Test failed.  See above for more details.

Dan Reverri

unread,
Jun 26, 2016, 5:10:56 PM6/26/16
to runwa...@googlegroups.com
It doesn't look like rest parameters are supported in node 4.4.6 without the `--harmony` flag. You should be able to run `main.js` as follows:

node --harmony bin/main.js

Rest parameters are the `...args` syntax:



--
You received this message because you are subscribed to the Google Groups "runway-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to runway-dev+...@googlegroups.com.
To post to this group, send email to runwa...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/runway-dev/9dad14fe-50cc-4c45-9041-8b1fafc87746%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Andrew Helwer

unread,
Jun 26, 2016, 8:03:24 PM6/26/16
to runway-dev
Yes thank you, that fixed the issue!

Diego Ongaro

unread,
Jun 27, 2016, 12:47:00 AM6/27/16
to runwa...@googlegroups.com
Thanks, Dan. And I just fixed the Travis CI test along with bad parser line numbers in 29d814d. That was caused by the Parsimmon library changing its format slightly (from returning just character offsets to now reporting character, line, and column).

Reply all
Reply to author
Forward
0 new messages