1602 / compound

MVC framework. Built on Node.JS. Works on server and browser.
http://compoundjs.com
1.6k stars 182 forks source link

CoffeeScript seeding. #607

Closed incutonez closed 10 years ago

incutonez commented 10 years ago

Has CoffeeScript seeding been taken out? I updated my Node modules (including CompoundJS) today, and I ran into an issue while trying to seed (with a file that previously worked... I did it earlier today). I have a simple seed file:

db/seeds/development/Host.coffee

Host.seed ->
  hid: '1'
  name: 'test'
  domain: 'test.com'

When I run compound seed from the root directory, I get this:

(function (exports, require, module, __filename, __dirname) { Host.seed ->
                                                                         ^
SyntaxError: Unexpected token >
  at Module._compile (module.js:439:25)
  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 Module.require (module.js:364:17)
  at require (module.js:380:17)
  at /Users/jharkay/workspace/test/twc-conops/node_modules/seedjs/lib/seed.js:47:13
  at Array.forEach (native)
  at Seed.plant (/Users/jharkay/workspace/test/twc-conops/node_modules/seedjs/lib/seed.js:43:25)
  at compound.tools.seed (/Users/jharkay/workspace/test/twc-conops/node_modules/seedjs/lib/railway-tools.js:18:18)
  at /usr/local/lib/node_modules/compound/bin/compound.js:43:37
  at Array.forEach (native)
  at /usr/local/lib/node_modules/compound/bin/compound.js:37:39
  at process._tickCallback (node.js:415:13)
  at Function.Module.runMain (module.js:499:11)
  at startup (node.js:119:16)
  at node.js:902:3

Has something changed with seeding? Are CoffeeScript files no longer supported? Or am I just doing something so stupid?

incutonez commented 10 years ago

It was something stupid. Of course. My solution is odd... I have a repository that I check out into:

~/workspace/myRepo

In there, I can seed just fine, but if I check out into:

~/workspace/test/myRepo

seeding doesn't work. Not quite sure why that is, but my solution is to not use the test dir...

incutonez commented 10 years ago

This actually seems like it could be a bug, or rather, I'd like to know what's happening. So let's say I have two identical workspaces (proj1 and proj2) that contain the same CompoundJS code... I've already seeded proj1, and that works, but when I go to seed proj2, I get my initial error posted above. It doesn't even have to be in a test folder... I had proj2 as a sibling to proj1, and I still got the error, but proj1 kept running fine.

Just curious what this might be.

anatoliychakkaev commented 10 years ago

We spotted that issue only happens with updated coffee-script (v1.7.0). Released fix in compound (frozen dependency of coffee-script 1.6.3) for now.

On Wed, Jan 29, 2014 at 2:19 PM, Jef notifications@github.com wrote:

This actually seems like it could be a bug, or rather, I'd like to know what's happening. So let's say I have two identical workspaces (proj1 and proj2) that contain the same CompoundJS code... I've already seeded proj1, and that works, but when I go to seed the proj2, I get my initial error posted above. It doesn't even have to be in a test folder... I had proj2 as a sibling to proj1, and I still got the error, but proj1 kept running fine.

Just curious what this might be.

Reply to this email directly or view it on GitHubhttps://github.com/1602/compound/issues/607#issuecomment-33587813 .

incutonez commented 10 years ago

Ah! Ok. Thanks for the information.