试图用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)。我不断收到同样的错误。