【发布时间】:2013-03-13 02:24:19
【问题描述】:
我希望使用 compound.js 创建一个 hello world 应用程序。
到目前为止,根本没有任何效果。
我已经安装了“npm install Compound -g”,让化合物在全球范围内可用。
现在我想运行“compound init”,我得到了这个:
(见第一个代码块)
在谷歌搜索时,我在 npm 上找到了一个名为 mongoose-compound-example-app 的示例应用程序。
在 npm 安装之后,我运行了“node”。按照自述文件中的建议:
(见第二个代码块)
我正在使用 Windows 8 x64。 Node 本身可以工作,而且我已经能够使用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
mongoose-compound-example-app 错误:
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?
-
完成。 Node 0.10.0刚出来,你觉得compound不兼容吗?
-
可能。我昨晚安装了 v.10 并且一堆东西坏了。由于 Compound 指定了 v.8,因此我建议您尝试一下,看看问题是否会消失。
-
我已经安装了 0.8,现在我遇到了不同的错误
-
听起来 Compound 需要一些更新。
标签: windows node.js express railway.js compoundjs