0

I wish to create a hello world application using compound.js.
So far, nothing works at all.
I've installed "npm install compound -g" to have compound be available globally.
Now I wish to run "compound init" and I get this:

(see first code block)

While googling, I found an example app on npm called mongoose-compound-example-app.
After npm installing that, I ran "node ." as suggested in the readme:

(see second code block)
I am using Windows 8 x64. Node itself works, and I've been able to run a "hello world" application using locomotive.js. I really want to get compound figured out and working, but I can't seem to get anywhere at all.

Thank you in advance!

EDIT: I am using Node v0.10.0

C:\Users\Lev\test>compound init hello

path.js:204
    throw new TypeError('Arguments to path.join must be strings');
          ^
TypeError: Arguments to path.join must be strings
at f (path.js:204:15)
at Object.filter (native)
at Object.exports.join (path.js:209:40)
at CompoundServer.module.exports [as extensions]      (C:\Users\Lev\AppData\Roaming\npm\node_modules\compound\lib\server\extensions.js:13:25)
at CompoundServer.initCompound (C:\Users\Lev\AppData\Roaming\npm\node_modules\compound\lib\compound.js:100:14)
at CompoundServer.init (C:\Users\Lev\AppData\Roaming\npm\node_modules\compound\lib\server\compound.js:42:29)
at C:\Users\Lev\AppData\Roaming\npm\node_modules\compound\lib\compound.js:61:18
at process._tickCallback (node.js:415:13)
at Function.Module.runMain (module.js:499:11)
at startup (node.js:119:16)
at node.js:903:3

mongoose-compound-example-app error:

C:\Projects\mongoose-compound-example-app\config\environment.js:11
    app.use(compound.assetsCompiler.init());
                                    ^
TypeError: Cannot call method 'init' of undefined
at Function.<anonymous> (C:\Projects\mongoose-compound-example-app\config\environment.js:11:41)
at Function.app.configure (C:\Projects\mongoose-compound-example-app\node_modules\express\lib\application.js:396:61)
at module.exports (C:\Projects\mongoose-compound-example-app\config\environment.js:10:9)
at evalInContextOf (C:\Projects\mongoose-compound-example-app\node_modules\compound\lib\compound.js:187:9)
at requireIfExists (C:\Projects\mongoose-compound-example-app\node_modules\compound\lib\compound.js:165:9)
at configureApp (C:\Projects\mongoose-compound-example-app\node_modules\compound\lib\compound.js:147:5)
at CompoundServer.initCompound (C:\Projects\mongoose-compound-example-app\node_modules\compound\lib\compound.js:91:9)
at CompoundServer.init (C:\Projects\mongoose-compound-example-app\node_modules\compound\lib\server\compound.js:42:29)
at C:\Projects\mongoose-compound-example-app\node_modules\compound\lib\compound.js:61:18
at process._tickCallback (node.js:415:13)
at Function.Module.runMain (module.js:499:11)
at startup (node.js:119:16)
at node.js:903:3
Lev Dubinets
  • 788
  • 10
  • 32
  • Can you paste in the actual text of your error messages, rather than a screen shot? What version of Node.js are you using? – Brad Mar 13 '13 at 02:34
  • Done. Node 0.10.0 just came out, do you think compound is incompatible? – Lev Dubinets Mar 13 '13 at 02:50
  • Possibly. I installed v.10 last night and a bunch of stuff broke. Since Compound specifies v.8, I recommend trying it to see if the problem goes away. – Brad Mar 13 '13 at 02:51
  • I've installed 0.8 and now i've got a different error – Lev Dubinets Mar 13 '13 at 03:00
  • Sounds like Compound needs some updating. – Brad Mar 13 '13 at 03:04
  • Perhaps, but the latest commit in the [github repo](https://github.com/1602/compound) was 12 hours ago. Surely it has to work on their end? Apparently upgrading to node 0.8.1 makes this work. – Lev Dubinets Mar 13 '13 at 03:09

1 Answers1

1

As discussed in the chat, there seems to be a problem or conflict with the version of Node.js you are using.

Compound's package.json says that it expects Node.js 0.8.0 or higher. You mentioned that it works in 0.9, but not in 0.10. This is likely a bug, as the odd-numbered versions of Node are typically the unstable versions before the later even number stable releases.

I recommend posting a reproducible example on the bug tracker for Compound, and possibly Node.js if you can narrow it down to a Node issue.

Community
  • 1
  • 1
Brad
  • 159,648
  • 54
  • 349
  • 530