hubotio / generator-hubot

Hubot generator for Yeoman
MIT License
155 stars 91 forks source link

yo hubot:script fails with lodash error #67

Closed technicalpickles closed 8 years ago

technicalpickles commented 8 years ago

I ran into this during during https://github.com/github/generator-hubot/issues/58#issuecomment-220475608

$ yo hubot:script
                     _____________________________  
                    /                             \ 
   //\              |      Extracting input for    |
  ////\    _____    |   script generation process  |
 //////\  /_____\   \                             / 
 ======= |[^_/\_]|   /----------------------------  
  |   | _|___@@__|__                                
  +===+/  ///     \_\                               
   | |_\ /// HUBOT/\\                             
   |___/\//      /  \\                            
         \      /   +---+                            
          \____/    |   |                            
           | //|    +===+                            
            \//      |xx|                            

? Owner Josh Nichols <technicalpickles@github.com>
? Script name the-thing
? Description A hubot script that does the things
? Keywords hubot, hubot-scripts

/Users/technicalpickles/.nodenv/versions/0.10.30/lib/node_modules/generator-hubot/node_modules/lodash/dist/lodash.js:6309
        throw e;
              ^
SyntaxError: Unexpected identifier
    at Function (<anonymous>)
    at Function.template (/Users/technicalpickles/.nodenv/versions/0.10.30/lib/node_modules/generator-hubot/node_modules/lodash/dist/lodash.js:6306:22)
    at underscore [as _engine] (/Users/technicalpickles/.nodenv/versions/0.10.30/lib/node_modules/generator-hubot/node_modules/yeoman-generator/lib/util/engines.js:31:14)
    at engine (/Users/technicalpickles/.nodenv/versions/0.10.30/lib/node_modules/generator-hubot/node_modules/yeoman-generator/lib/actions/actions.js:314:10)
    at template (/Users/technicalpickles/.nodenv/versions/0.10.30/lib/node_modules/generator-hubot/node_modules/yeoman-generator/lib/actions/actions.js:289:15)
    at yeoman.generators.Base.extend.writing.app (/Users/technicalpickles/.nodenv/versions/0.10.30/lib/node_modules/generator-hubot/generators/script/index.js:130:12)
    at /Users/technicalpickles/.nodenv/versions/0.10.30/lib/node_modules/generator-hubot/node_modules/yeoman-generator/lib/base.js:395:14
    a
technicalpickles commented 8 years ago

https://github.com/github/generator-hubot/issues/50 is an error others were running into with this generator

technicalpickles commented 8 years ago

Actually just kidding, this was a change caused by a change I did. Still trying to figure out what caused it.

Andyliwr commented 8 years ago

How you solved the problem? I get the same case to you.

technicalpickles commented 8 years ago

@Andyliwr I was yo hubot:script with a development copy of this repository (ie ran npm install -g in a checkout) that had bad changes.

I never tracked down specifically what was wrong, but it seems that something in one of the frameworks used by yeoman is swallowing exceptions, and only exposing this lodash one. I wasn't able to find a better way to debug.