q is not extended
Closed this issue · 4 comments
blowsie commented
I can debug and see that the q-flow plugin is adding some methods in the q-flow.js
, but when inside my app.js
, the q extensions are not visible.
var q = require('q');
require('q-flow');
console.log(q.each) // undefined
What's going wrong here?
jbblanchet commented
Are your using Node or RequireJs?
blowsie commented
Node
jbblanchet commented
Got it. You must have installed either a newer version of q, or installed q-flow first then q. The result is that you now have 2 q modules handing around, one directly under your node_modules folder, and the other under node_modules/q-flow. Your first line of code loads one q, then q-flow loads and modify the other one.
Delete your node_modules folder, then either install q@0.9.7 first or put both dependencies inside your package.json and run npm install.
blowsie commented
Thanks ill give this a go