Skip to content
This repository has been archived by the owner on Apr 17, 2024. It is now read-only.

SyntaxError: unexpected MATH (2nd) #30

Closed
avaldivi opened this issue Apr 30, 2019 · 2 comments
Closed

SyntaxError: unexpected MATH (2nd) #30

avaldivi opened this issue Apr 30, 2019 · 2 comments

Comments

@avaldivi
Copy link

avaldivi commented Apr 30, 2019

@benpbolton I am having this same issue #22 and ran npm install coffee-script --save but it is still an error I also did coffelint but that also was not a solution. Have an idea?

{
  "name": "gitqueue",
  "version": "0.0.0",
  "private": true,
  "author": "Adrianna Valdivia <[email protected]>",
  "description": "Pull Request Organizer",
  "dependencies": {
    "coffee-script": "^1.12.7",
    "coffeelint": "^2.1.0",
    "hubot": "^3.3.2",
    "hubot-code-review": "^0.6.6",
    "hubot-diagnostics": "^1.0.0",
    "hubot-google-images": "^0.2.7",
    "hubot-google-translate": "^0.2.1",
    "hubot-help": "^1.0.1",
    "hubot-heroku-keepalive": "^1.0.3",
    "hubot-maps": "0.0.3",
    "hubot-pugme": "^0.1.1",
    "hubot-redis-brain": "^1.0.0",
    "hubot-rules": "^1.0.0",
    "hubot-scripts": "^2.17.2",
    "hubot-shipit": "^0.2.1",
    "hubot-slack": "^4.6.0"
  },
  "engines": {
    "node": "10.13.0"
  }
}
[
  "hubot-diagnostics",
  "hubot-help",
  "hubot-heroku-keepalive",
  "hubot-google-images",
  "hubot-google-translate",
  "hubot-pugme",
  "hubot-maps",
  "hubot-redis-brain",
  "hubot-rules",
  "hubot-shipit",
  "hubot-code-review"
]
[Thu Apr 18 2019 19:52:07 GMT-0400 (Eastern Daylight Time)] INFO hubot-redis-brain: Using default redis on localhost:6379
[Thu Apr 18 2019 19:52:07 GMT-0400 (Eastern Daylight Time)] ERROR Unable to load /Users/adriannavaldivia/src/my-awesome-hubot/node_modules/hubot-code-review/src/code-reviews: SyntaxError: unexpected MATH
  at Object.exports.throwSyntaxError (/Users/adriannavaldivia/src/my-awesome-hubot/node_modules/coffeescript/lib/coffee-script/helpers.js:197:13)
  at Parser.parser.yy.parseError (/Users/adriannavaldivia/src/my-awesome-hubot/node_modules/coffeescript/lib/coffee-script/coffee-script.js:265:20)
  at Parser.parse (/Users/adriannavaldivia/src/my-awesome-hubot/node_modules/coffeescript/lib/coffee-script/parser.js:537:22)
  at compile (/Users/adriannavaldivia/src/my-awesome-hubot/node_modules/coffeescript/lib/coffee-script/coffee-script.js:35:24)
  at Object.loadFile (/Users/adriannavaldivia/src/my-awesome-hubot/node_modules/coffeescript/lib/coffee-script/coffee-script.js:176:14)
  at Module.load (/Users/adriannavaldivia/src/my-awesome-hubot/node_modules/coffeescript/lib/coffee-script/coffee-script.js:211:36)
  at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
  at Function.Module._load (internal/modules/cjs/loader.js:529:3)
  at Module.require (internal/modules/cjs/loader.js:636:17)
  at require (internal/modules/cjs/helpers.js:20:18)
  at Object.<anonymous> (/Users/adriannavaldivia/src/my-awesome-hubot/node_modules/hubot-code-review/src/code-reviews.coffee:10:15, <js>:4:17)
  at Object.<anonymous> (/Users/adriannavaldivia/src/my-awesome-hubot/node_modules/hubot-code-review/src/code-reviews.coffee:10:1, <js>:350:4)
  at Module._compile (internal/modules/cjs/loader.js:688:30)
  at Object.loadFile (/Users/adriannavaldivia/src/my-awesome-hubot/node_modules/coffeescript/lib/coffee-script/coffee-script.js:182:19)
  at Module.load (/Users/adriannavaldivia/src/my-awesome-hubot/node_modules/coffeescript/lib/coffee-script/coffee-script.js:211:36)
  at tryModuleLoad (internal/modules/cjs/loader.js:537:12)
  at Function.Module._load (internal/modules/cjs/loader.js:529:3)
  at Module.require (internal/modules/cjs/loader.js:636:17)
  at require (internal/modules/cjs/helpers.js:20:18)
  at Robot.loadFile (/Users/adriannavaldivia/src/my-awesome-hubot/node_modules/hubot/src/robot.js:360:22)
  at module.exports (/Users/adriannavaldivia/src/my-awesome-hubot/node_modules/hubot-code-review/index.coffee:22:3, <js>:10:18)
  at packages.forEach.pkg (/Users/adriannavaldivia/src/my-awesome-hubot/node_modules/hubot/src/robot.js:409:52)
  at Array.forEach (<anonymous>:null:null)
  at Robot.loadExternalScripts (/Users/adriannavaldivia/src/my-awesome-hubot/node_modules/hubot/src/robot.js:409:25)
  at /Users/adriannavaldivia/src/my-awesome-hubot/node_modules/hubot/bin/hubot.js:207:13
  at FSReqWrap.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:53:3)
@benpbolton
Copy link
Member

Hello @avaldivi !

I didn't have time to verify thoroughly, but can you see if a:

yo hubot
...
npm install --save coffeescript hubot-code-review hubot-slack@^4
bin/hubot

Behaves? Wondering if it's the 'ole coffee-script vs coffeescript dance...

@avaldivi
Copy link
Author

avaldivi commented May 3, 2019

@benpbolton thank you so much! Just to let others know not to go with the latest coffeescript since there seems to be an incompatibility between the hubot-slack and coffeescript 2.x

I downgraded to the same version as [email protected]so [email protected]
referenced from #526

I have one question

  1. I check my heroku logs and an env var is missing
ERROR hubot-heroku-keepalive included, but missing HUBOT_HEROKU_KEEPALIVE_URL. `heroku config:set HUBOT_HEROKU_KEEPALIVE_URL=$(heroku apps:info -s | grep web.url | cut -d= -f2)

What url should I set here?

This is really awesome by the way. Thanks for building this!

Nvm found info here

@avaldivi avaldivi closed this as completed May 3, 2019
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