buildit / generator-aem-with-react

Yeoman generator for creating new React components for use in AEM.
ISC License
1 stars 1 forks source link

Error when generating an atom component #1

Open sasconsul opened 7 years ago

sasconsul commented 7 years ago

Here is the stack trace from a fresh install:

LUSC02SR2KMH03Q:yo-aem-react sschmukler$ yo
? 'Allo Stuart! What would you like to do? Aem With React

Make sure you are in the directory you want to scaffold into.
This generator can also be run with: yo aem-with-react

? What is the project name? demo
? What site is your component for? CHEF styleguide
? What is the type of your new component? Atom
? What is the name of your new component? dempLogo
? Does it accept other components? No
Creating styleguide/atoms/dempLogo
Creating content/jcr_root/apps/demo/components/styleguide/dempLogo

     _-----_     ╭───────────────────────╮
    |       |    │      Bye from us!     │
    |--(o)--|    │       Chat soon.      │
   `---------´   │      Yeoman team      │
    ( _´U`_ )    │    http://yeoman.io   │
    /___A___\   /╰───────────────────────╯
     |  ~  |
   __'.___.'__
 ´   `  |° ´ Y `

events.js:163
      throw er; // Unhandled 'error' event
      ^
AssertionError: /Users/sschmukler/devenv/tstb/yo-aem-react/src/styleguide/atoms/index.js doesn't exist
    at EditionInterface.module.exports [as read] (/usr/local/lib/node_modules/generator-aem-with-react/node_modules/mem-fs-editor/lib/actions/read.js:18:3)
    at constructor._updateIndex (/usr/local/lib/node_modules/generator-aem-with-react/app/index.js:90:33)
    at constructor.writing (/usr/local/lib/node_modules/generator-aem-with-react/app/index.js:55:10)
    at Object.<anonymous> (/usr/local/lib/node_modules/generator-aem-with-react/node_modules/yeoman-generator/lib/base.js:431:23)
    at /usr/local/lib/node_modules/generator-aem-with-react/node_modules/run-async/index.js:25:25
    at /usr/local/lib/node_modules/generator-aem-with-react/node_modules/run-async/index.js:24:19
    at /usr/local/lib/node_modules/generator-aem-with-react/node_modules/yeoman-generator/lib/base.js:432:9
    at runCallback (timers.js:672:20)
    at tryOnImmediate (timers.js:645:5)
    at processImmediate [as _immediateCallback] (timers.js:617:5)
LUSC02SR2KMH03Q:yo-aem-react sschmukler$ pwd
/Users/sschmukler/devenv/tstb/yo-aem-react

Not sure where to go from here.

panosvoudouris commented 7 years ago

Hi @sasconsul the package was setup assuming that there are a couple of sub-projects within src. Basically, if the answer to the second question is .COM you need a src/com directory for all your code to go in, if it is CHEF styleguide you need a src/styleguide dir.

These were setup for a particular project we were working on but have since stopped development on this generator. If you want to make any improvements you are more than welcome.