我希望使用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
你能粘貼錯誤信息的實際文字,而不是屏幕截圖嗎?你使用的是什麼版本的Node.js? – Brad 2013-03-13 02:34:07
完成。節點0.10.0剛出來,你認爲複合是不兼容的嗎? – 2013-03-13 02:50:35
可能。昨晚我安裝了v.10,一些東西破壞了。由於Compound指定了v.8,因此建議嘗試查看問題是否消失。 – Brad 2013-03-13 02:51:32