2012-10-02 118 views
0

我安装了最新的express-coffee并且安装了node-config。我创建了一个简单的src /配置/ default.yamlnode.js express-coffee错误:ENOENT,没有这样的文件或目录

Database: 
    db_host: localhost 
    db_name: test 

在我的src /模型/ index.coffee

config = require('config').Database 

console.log "host: #{config.db_host}" 

但是,试图与cake dev甚至cake build && node app我正在启动服务器时,以下错误:

Cannot write runtime.json file Error: ENOENT, no such file or directory 

试图在这里和谷歌搜索问题,但无法找到任何东西。即使只是ENOENT或node-config runtime.json上的少量命中也没有帮助。任何人都遇到过这个问题?

回答

0

原来问题出在config/default.yaml所在的位置。我必须将其移至应用程序的根目录。将它移动到root - config/default.yaml修复了这个问题。 错误消息在确定发生了什么并不是很有帮助。

相关问题