我不得不修改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位,命令行以管理员身份运行
我对Lithium框架感到满意,并且想知道是否有任何样本可以使用MongoDB或Memcache进行Lithium Sessions.是否需要编写新的会话适配器?
我正在使用\ 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)