These are chat archives for jescalan/roots

Jun 2016
Jun 22 2016 20:57

New to Roots....trying to follow the "Compiling a Project" steps

var Roots = require('roots');
var project = new Roots('/path/to/project');


When I run that, I get a .coffee error that says "Use CoffeeScript.register() or require the coffee-script/register module to require files."

Any help to point me in the right direction? Thanks in advance

Jeff Escalante
Jun 22 2016 21:19
are you trying to use the javascript api on purpose?
most people use roots through the command line
also do you have coffeescript installed in your roots project?
if you want to have it compile coffee files, you need that to be installed
Jun 22 2016 22:10

@jescalan My Roots project is pretty much the base configuration from what I understand, it has worked for me to run 'roots watch' through the command line and it compiles the coffee files fine.

However, when I add a js file a directory up from my project, and point to the project path, thats when I get this error. I am using the js API on purpose, to trigger a build based on an event via Lambda

Jeff Escalante
Jun 22 2016 22:19
honestly i have no idea. the CLI uses the js api
in that exact same manner
so something weird must be going on with your setup
can you trace the error? if you install coffeescript in the directory up does it work, maybe its a dependency location thing?
can you dig a little deeper?