【问题标题】:Compoundjs fails to run with jugglingdb-mysqlCompoundjs 无法与 jugglingdb-mysql 一起运行
【发布时间】:2013-07-11 14:15:27
【问题描述】:

尝试用mysql测试compoundjs,但失败了。

我的系统是 Debian 7,带有以下版本的 nodejs 和 npm

$节点-v v0.10.13 $ npm -v 1.3.4

这是我安装compoundjs的方式

sudo npm install -g 复合 sudo npm install -g jugglingdb --save sudo npm install -g jugglingdb-mysql 复合初始化 testapp --db mysql cd testapp npm 安装 $节点服务器.js 警告:未安装 JugglingDB 适配器“mysql”, 所以你的模型不起作用,修复运行: npm install jugglingdb-mysql /srv/www/playground/node/testapp/node_modules/jugglingdb/lib/railway.js:55 if (!schema.adapter) throw new Error('适配器未定义'); ^ 错误:未定义适配器 在初始化(/srv/www/playground/node/testapp/node_modules/jugglingdb/lib/railway.js:55:36) 在 CompoundServer.initialize (/srv/www/playground/node/testapp/node_modules/jugglingdb/index.js:31:19) 在 CompoundServer.EventEmitter.emit (events.js:98:17) 在 CompoundServer.initCompound (/srv/www/playground/node/testapp/node_modules/compound/lib/compound.js:123:14) 在 CompoundServer.initCompoundServer [as init] (/srv/www/playground/node/testapp/node_modules/compound/lib/server/compound.js:53:29) 在 /srv/www/playground/node/testapp/node_modules/compound/lib/compound.js:67:18 在 process._tickCallback (node.js:415:13) 在 Function.Module.runMain (module.js:499:11) 启动时 (node.js:119:16) 在 node.js:901:3

收到上述错误后,我尝试了 npm install jugglingdb-mysql 我仍然得到同样的错误。我尝试在全局和本地安装 jugglingdb 和 jugglingdb-mysql(没有 -g)。我不断收到同样的错误。

【问题讨论】:

    标签: mysql node.js compoundjs jugglingdb


    【解决方案1】:

    这个bug是由于jugglingdb-mysql的npm存放中使用的jugglingdb版本,所以修复它的唯一方法是删除目录并复制你在主项目中使用的那个:

    cd $YOUR_PROJECT_ROOT
    rm -rf node_modules/jugglingdb-mysql/node_modules/jugglingdb
    cp -R node_modules/jugglingdb node_modules/jugglingdb-mysql/node_modules
    

    我没有尝试从 github 手动安装适配器,也许它也可以。

    问题在这里报告https://github.com/jugglingdb/mysql-adapter/issues/46

    【讨论】:

      猜你喜欢
      • 2013-04-23
      • 1970-01-01
      • 2013-06-28
      • 2019-03-11
      • 2020-09-24
      • 1970-01-01
      • 1970-01-01
      • 2013-08-08
      • 1970-01-01
      相关资源
      最近更新 更多