Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Make error; SyntaxError: Unexpected token { #67

Closed
themmes opened this issue May 8, 2017 · 2 comments
Closed

Make error; SyntaxError: Unexpected token { #67

themmes opened this issue May 8, 2017 · 2 comments

Comments

@themmes
Copy link

themmes commented May 8, 2017

Trying to make Moonbase (see https://github.com/motif/moonbase) i stumbled upon a syntax error in Oniguruma

Distributor ID:	Ubuntu
Description:	Ubuntu 16.04.2 LTS
Release:	16.04
Codename:	xenial

nodejs --version
v4.2.6

gulp --version
[22:14:20] CLI version 1.3.0

But got the following error; SyntaxError: Unexpected token {

   __  ___               __
  /  |/  /__  ___  ___  / /  ___ ____ ___
 / /|_/ / _ \/ _ \/ _ \/ _ \/ _ `(_-</ -_)
/_/  /_/\___/\___/_//_/_.__/\_,_/___/\__/

[22:08:15] Running watch for /home/tom/landing
/home/tom/landing/node_modules/oniguruma/src/oniguruma.js:1
(function (exports, require, module, __filename, __dirname) { const {OnigScanner, OnigString} = require('../build/Release/onig_scanner.node')
                                                                    ^

SyntaxError: Unexpected token {
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:374:25)
    at Object.Module._extensions..js (module.js:417:10)
    at Module.load (/home/tom/landing/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
    at Function.Module._load (module.js:301:12)
    at Module.require (module.js:354:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/home/tom/landing/node_modules/first-mate/lib/grammar.js:10:16)
    at Object.<anonymous> (/home/tom/landing/node_modules/first-mate/lib/grammar.js:380:4)
    at Module._compile (module.js:410:26)
    at Object.Module._extensions..js (module.js:417:10)
    at Module.load (/home/tom/landing/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
    at Function.Module._load (module.js:301:12)
    at Module.require (module.js:354:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/home/tom/landing/node_modules/first-mate/lib/grammar-registry.js:12:13)
    at Object.<anonymous> (/home/tom/landing/node_modules/first-mate/lib/grammar-registry.js:268:4)
    at Module._compile (module.js:410:26)
    at Object.Module._extensions..js (module.js:417:10)
    at Module.load (/home/tom/landing/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
    at Function.Module._load (module.js:301:12)
    at Module.require (module.js:354:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/home/tom/landing/node_modules/first-mate/lib/first-mate.js:4:22)
    at Object.<anonymous> (/home/tom/landing/node_modules/first-mate/lib/first-mate.js:8:4)
    at Module._compile (module.js:410:26)
    at Object.Module._extensions..js (module.js:417:10)
    at Module.load (/home/tom/landing/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
    at Function.Module._load (module.js:301:12)
    at Module.require (module.js:354:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/home/tom/landing/node_modules/highlights/lib/highlights.js:14:21)
    at Object.<anonymous> (/home/tom/landing/node_modules/highlights/lib/highlights.js:420:4)
    at Module._compile (module.js:410:26)
    at Object.Module._extensions..js (module.js:417:10)
    at Module.load (/home/tom/landing/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
    at Function.Module._load (module.js:301:12)
    at Module.require (module.js:354:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/home/tom/landing/node_modules/moonbase/gulpfile.coffee:43:14)
    at Object.<anonymous> (/home/tom/landing/node_modules/moonbase/gulpfile.coffee:1:1)
    at Module._compile (module.js:410:26)
    at Object.loadFile (/home/tom/landing/node_modules/coffee-script/lib/coffee-script/register.js:16:19)
    at Module.load (/home/tom/landing/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
    at Function.Module._load (module.js:301:12)
    at Module.require (module.js:354:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/home/tom/landing/node_modules/moonbase/run.coffee:46:12)
    at Object.<anonymous> (/home/tom/landing/node_modules/moonbase/run.coffee:3:1)
    at Module._compile (module.js:410:26)
    at Object.loadFile (/home/tom/landing/node_modules/coffee-script/lib/coffee-script/register.js:16:19)
    at Module.load (/home/tom/landing/node_modules/coffee-script/lib/coffee-script/register.js:45:36)
    at Function.Module._load (module.js:301:12)
    at Module.require (module.js:354:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/home/tom/landing/node_modules/moonbase/run.js:4:11)
    at Module._compile (module.js:410:26)
    at Object.Module._extensions..js (module.js:417:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Function.Module.runMain (module.js:442:10)
    at startup (node.js:136:18)
    at node.js:966:3

Makefile:20: recipe for target 'watch' failed
make: *** [watch] Error 1

Do you think you can help me out? Would love to experiment with your project, thanks in advance!

@50Wliu
Copy link
Contributor

50Wliu commented May 8, 2017

This is being fixed in #66. You may want to subscribe there for updates. In the meantime, upgrading to Node v6 or higher should work.

@50Wliu 50Wliu closed this as completed May 8, 2017
@themmes
Copy link
Author

themmes commented May 8, 2017

Great, I did not know I was using an out-of-date nodejs, using PPA for installing 6.x worked like a charm. (for anyone who comes across the problem, as explained here: https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-ubuntu-16-04)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants