2013-03-13 24 views
0

我希望使用compound.js創建一個hello world應用程序。
到目前爲止,沒有任何工作。
我已經安裝了「npm install compound -g」以使化合物在全球範圍內可用。
現在我想運行「複方初始化」,我得到這個:在窗口上使用複合js。無法啓動任何東西

(見第一個代碼塊)

在谷歌上搜索,我發現故宮的示例應用程序名爲mongoose-compound-example-app
npm安裝後,我跑了「節點」。如自述文件中所示:

(請參閱第二個代碼塊)
我正在使用Windows 8 x64。節點本身有效,我已經能夠使用locomotive.js運行「hello world」應用程序。我真的很想弄清楚和工作,但我似乎無法得到任何地方。

預先感謝您!

編輯: 我使用節點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 

貓鼬的化合物,例如,應用程序錯誤:

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 
+0

你能粘貼錯誤信息的實際文字,而不是屏幕截圖嗎?你使用的是什麼版本的Node.js? – Brad 2013-03-13 02:34:07

+0

完成。節點0.10.0剛出來,你認爲複合是不兼容的嗎? – 2013-03-13 02:50:35

+0

可能。昨晚我安裝了v.10,一些東西破壞了。由於Compound指定了v.8,因此建議嘗試查看問題是否消失。 – Brad 2013-03-13 02:51:32

回答

1

由於discussed in the chat,似乎有與問題或衝突您正在使用的Node.js版本。

化合物的package.json表示它期望Node.js 0.8.0或更高版本。你提到它在0.9中工作,但不在0.10中。這可能是一個錯誤,因爲奇數編號的Node版本通常是穩定版本之前的穩定版本。

我建議在複合錯誤跟蹤器上發佈一個可重複使用的示例,如果可以縮小到Node問題,可能還需要Node.js。

+0

[複合的github中的問題鏈接](https://github.com/1602/compound/issues/459) – 2013-03-13 03:26:56

相關問題