小编Eri*_*c C的帖子

在Windows上运行grunt.cmd的多个问题

我不得不修改grunt.cmd,因为我的系统路径非常错误:

本来:

%~dp0\Application Data\npm\node_modules\grunt

哪个会打印:

\\dacwnas\Profiles\<user>\Application Data\npm\Application Data\npm\node_modules\grunt

运行grunt.cmd会抛出一个找不到模块的错误.更改它以%~dp0\node_modules\grunt"删除错误.

但是,grunt.cmd --version在Windows中运行什么也没输出.它只是暂停一会儿并返回空白命令行.

我正在运行Windows 7 64位,命令行以管理员身份运行

windows node.js gruntjs

7
推荐指数
1
解决办法
4732
查看次数

用于Lithium Sessions的Memcache,Mongodb或其他数据库存储

我对Lithium框架感到满意,并且想知道是否有任何样本可以使用MongoDB或Memcache进行Lithium Sessions.是否需要编写新的会话适配器?

lithium

5
推荐指数
1
解决办法
812
查看次数

MongoCursorException被抛出,但没有被Lithium中的try/catch捕获

我正在使用\ lithium\data\source\MongoDB :: update()在安全模式下进行upsert.在某些更新中,由于传递了重复的密钥,因此存在预期的MongoCursorException.下面的try/catch没有捕获错误,并且它回到了我已经附加到Dispatcher :: run()的ErrorHandler.

try {
    $result = Items::update($record, $conditions, array('upsert' => true, 'safe'   => true));
} catch (MongoCursorException $e) {
    $result = false;
} catch (Exception $e) {
    $result = false;
}
Run Code Online (Sandbox Code Playgroud)

php mongodb lithium

2
推荐指数
1
解决办法
303
查看次数

标签 统计

lithium ×2

gruntjs ×1

mongodb ×1

node.js ×1

php ×1

windows ×1