gyllstromk/q-plus-plus

q is not extended

Closed this issue · 4 comments

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?

Are your using Node or RequireJs?

Node

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.

Thanks ill give this a go