CompoujdJS Generators Missing

68 Views Asked by At

I am new to compoundjs and have started creating helloworld samples for compoundjs.

I tried to use the default generators, but in my app the only available generator is app, the rest like controller, model are missing.

Below is the output when i type compound in terminal

Usage: compound command [argument(s)]

Commands:
  h,  help                Display usage information
  i,  init                Initialize compound app
  g,  generate [smth]     Generate something awesome
  r,  routes [filter]     Display application routes
  c,  console             Debug console
  s,  server [port]       Run compound server
  x,  install [module]    Install compound module
  sd, seed plant|harvest  Populate database with seed data
  db, db [migrate|update] Migrate or update database(s)

Available generators:

  app

What am i doing wrong? Please suggest.

FYI : My compound version is 1.1.0

2

There are 2 best solutions below

0
On

Found solution.

Added missing module co-generators in package.json and this fixed the issue.

0
On

For me the problem was elsewhere. I had to remove all my custom code until I found the problem in autoload.js which had two module.exports = function() definitions. After moving my custom module to defaultModules and removing the 2nd function(), compound correctly returned the installed generators.