HazyResearch / mindbender

Tools for iterative knowledge base development with DeepDive
116 stars 32 forks source link

Master branch doesn't build, but there's an easy fix #76

Closed raphaelhoffmann closed 8 years ago

raphaelhoffmann commented 8 years ago

When you build master and launch the application, you'll get a javascript error in the browser. The problem is that some coffeescript gets translated into incorrect javascript:

angular.module('mindbender.dashboard', ['ui.ace', 'ui.bootstrap', 'ui.sortable'].service('Dashboard', ...

Note that there's a closing parenthesis missing after 'ui.sortable']. This is because the coffeescript compiler used is version 1.6.3 which doesn't correctly handle angularjs code.

The correct version 1.8.0 is specified in gui/frontend/bower.json, but it never gets called. Instead, an npm package (karma) forces installation of coffeescript 1.6.3 into gui/frontend/node_modules which is then used in the build.

There's an easy fix: Add "coffee-script": "1.8.0" to gui/frontend/package.json in section devDependencies.

(There's also a second error that this fixes: the older coffeescript didn't support the power operator, eg. 3 ** 3)

netj commented 8 years ago

Yeah sorry for this. I think this also happens with node >= 4 or 5?

I'm collecting some fixes to the fix for new spouse example branch btw.