Compound db migrate

48 views
Skip to first unread message

Zachary B

unread,
Sep 1, 2014, 6:23:32 AM9/1/14
to compo...@googlegroups.com
I'm quite a novice when it comes to compound/node/mvc and had just finished developing my first app in development. After this, I copied the files over to my server and ran npm install as well as installing compoundjs globally and coffee-script globally. Once I finished doing this and ran 

NODE_ENV=production compound db migrate

And was given a lovely big error

pi@raspberrypi ~/website $ NODE_ENV=production compound db migrate

/usr/local/lib/node_modules/compoundjs/node_modules/coffee-script/lib/coffee-script/coffee-script.js:195
          throw new Error("Use CoffeeScript.register() or require the coffee-s
                ^
Error: Use CoffeeScript.register() or require the coffee-script/register module to require .coffee.md files.
  at Object._base.(anonymous function) [as .coffee] (/usr/local/lib/node_modules/compoundjs/node_modules/coffee-script/lib/coffee-script/coffee-script.js:195:17)
  at Module.load (module.js:356:32)
  at Function.Module._load (module.js:312:12)
  at Module.require (module.js:364:17)
  at require (module.js:380:17)
  at Object.<anonymous> (/usr/local/lib/node_modules/compoundjs/bin/compound:11:11)
  at Module._compile (module.js:456:26)
  at Object.Module._extensions..js (module.js:474:10)
  at Module.load (module.js:356:32)
  at Function.Module._load (module.js:312:12)
  at Function.Module.runMain (module.js:497:10)
  at startup (node.js:119:16)
  at node.js:906:3

So I tried just copying all the files in the node_modules folder of the application to my server, still got the same problem. Next I tried making sure the version of compoundjs and coffee-script that I installed globally were the same as the ones installed globally on my development machine, still, same problem. I would be very thankful if anyone knows what I am doing wrong.

Maxime Picaud

unread,
Sep 2, 2014, 4:34:48 PM9/2/14
to compo...@googlegroups.com
Hi !

I think you are doing wrong nothing :) !

It is because the way of registering coffee-script has changed in version 1.7.0. It was fixed in https://github.com/1602/compound/pull/636. This version has not been published yet so you can :
  1. use the github repository in your package.json by adding something like : "compound": "1602/compound#master"
  2. or use an older version of coffee-script

Regards

Zachary B

unread,
Sep 2, 2014, 4:39:30 PM9/2/14
to compo...@googlegroups.com
Thank-you very much for the help. In the end, I found what the problem was, which was that I had installed the compoundjs node module, instead of the compound node module.
Reply all
Reply to author
Forward
0 new messages