lukeed / taskr

A fast, concurrency-focused task automation tool.
MIT License
2.53k stars 74 forks source link

this.plugin is not a function #240

Closed ghost closed 7 years ago

ghost commented 7 years ago
message: this.plugin is not a function
stack:
  - TypeError: this.plugin is not a function
  -     at Object.module.exports (~/[project]/node_modules/fly-uglify/index.js 7:7)
  -     at ~/.config/yarn/global/node_modules/fly/lib/fly.js 94:13
  -     at Array.forEach (native)
  -     at new Fly (~/.config/yarn/global/node_modules/fly/lib/fly.js 89:10)
  -     at Object.module.exports [as spawn] (~/.config/yarn/global/node_modules/fly/lib/cli/spawn.js 24:9)
  -     at module.exports.next (<anonymous>)
  -     at onFulfilled (~/.config/yarn/global/node_modules/co/index.js 65:19)

with the following flyfile

var f = module.exports
var paths = {
    scripts: ['src/views/*.js']
}

f.default = function * () {
    yield this.watch(paths.scripts, 'build')
}

f.build = function * () {
    yield this
        .source(paths.scripts)
        .uglify()
        .target('public')
}

after having executed

yarn global add fly
yarn add fly-uglify
fly -l
lukeed commented 7 years ago

Hey @flagello

You kinda caught us at an awkward time... 😟 Fly is currently in beta, while a lot of its most-used plugins already updated for the new beta.

So, if you want to use the beta version of Fly, you have to install it like this:

yarn global add fly@beta

Of course, the global part is optional.

If you want to use the "stable" release, you may continue using your version of Fly. However, you will need to downgrade most of your fly-* plugins. For example, to use fly-uglify, you need to install:

yarn add --dev fly-uglify@^1.0

This is because 1.0 was the last version that relied on Fly v1.x.

Sorry for the confusion! Our beta phase is almost done!

ghost commented 7 years ago

Thank you @lukeed! Fly is such a well-designed and executed idea. Keep up the good work!

lukeed commented 7 years ago

Thank you @flagello! Be sure to check out fly-kit-web if you're just getting started. For now, it's the fastest way to familiarize with Fly & its ecosystem. There are also a few other fly-kits available; just have to search for them on my profile.