Change require("q") to require("core/promise")