srsgores/generator-wordpress-plugin

Errors on yo wordpress-plugin

paulhayler opened this issue · 7 comments

Hi great generator. I have used it before without any problems but I recently getting errors as follows when generator runs can you help?

(!) #_ is deprecated. Require your own version of Lodash or underscore.string
/usr/local/lib/node_modules/yo/node_modules/inquirer/node_modules/rx/dist/rx.js:579
throw e;
^
TypeError: Cannot read property 'slugify' of undefined
at wordpressPluginGenerator. (/usr/local/lib/node_modules/generator-wordpress-plugin/app/index.js:83:31)
at wordpressPluginGenerator. (/usr/local/lib/node_modules/generator-wordpress-plugin/node_modules/yeoman-generator/lib/base.js:233:7)
at PromptUI.onCompletion (/usr/local/lib/node_modules/yo/node_modules/inquirer/lib/ui/prompt.js:69:10)
at AnonymousObserver.Rx.AnonymousObserver.AnonymousObserver.completed (/usr/local/lib/node_modules/yo/node_modules/inquirer/node_modules/rx/dist/rx.js:1793:12)
at AnonymousObserver.Rx.internals.AbstractObserver.AbstractObserver.onCompleted (/usr/local/lib/node_modules/yo/node_modules/inquirer/node_modules/rx/dist/rx.js:1730:14)
at AnonymousObserver.tryCatcher (/usr/local/lib/node_modules/yo/node_modules/inquirer/node_modules/rx/dist/rx.js:567:29)
at AutoDetachObserverPrototype.completed (/usr/local/lib/node_modules/yo/node_modules/inquirer/node_modules/rx/dist/rx.js:5288:56)
at AutoDetachObserver.Rx.internals.AbstractObserver.AbstractObserver.onCompleted (/usr/local/lib/node_modules/yo/node_modules/inquirer/node_modules/rx/dist/rx.js:1730:14)
at InnerObserver.onCompleted (/usr/local/lib/node_modules/yo/node_modules/inquirer/node_modules/rx/dist/rx.js:3425:65)
at InnerObserver.tryCatcher (/usr/local/lib/node_modules/yo/node_modules/inquirer/node_modules/rx/dist/rx.js:567:29)

Which version of yo are you using? The new versions of Yeoman have a completely different way of writing templates. I am surprised if this generator has been working up until now with newer versions.

Why not just require the older version of Yeoman in your WP project/plugin with npm install --save-dev generator-wordpress-plugin? Then, you can do yo wordpress-plugin from the project directory.

Ok many thanks that makes sense

Paul Hayler

Creative Design + Development

4 Gloucester Passage | North Laines | Brighton | BN1 4AS

t: 01273 693762
m: 07818 261022
e: paul.hayler@neptik.com mailto:paul.hayler@neptik.com
w: www.neptik.com http://neptik.com/

@NeptikCreative https://twitter.com/NeptikCreative?lang=en-gb | Facebook https://www.facebook.com/NeptikCreative?ref=hl | LinkedIn http://uk.linkedin.com/in/phayler

Disclaimer:

This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of Neptik LTD. The recipient should check this email and any attachments for the presence of viruses. Neptik LTD accepts no liability for any damage caused by any virus transmitted by this email. Neptik LTD will not be liable for any personal comments made in any email, or for any losses arising as a result of anyone other than the addressee acting in reliance on anything said in the email. Nothing in the email is to be treated as being a part of, or as forming, a legally binding contract between Neptik LTD and the addressee or with any third party. Any quotation in the email will not constitute a formal contractual offer, and is subject to contract. Finally, the addressee is responsible for any consequences of forwarding the email to any third party and for virus checking the email before they send it onwards.

On 3 Jul 2015, at 17:06, Sean Goresht notifications@github.com wrote:

npm install --save-dev generator-wordpress-plugin

@srsgores I use this quite a bit and I'd love to know if you have any plan to fix the compatibility issues with the newer yeoman?

@vimes1984, can you describe what's not working at the moment? Would you just like to be able to globally generate apps without using my solution described above?

Ok I've forked it and patched it, I hope you don't mind mate...
it should now work wherever...

umm it's my first look at the innards of a yeoman generator so I'm not sure if it's the best way of doign it...
it does work though!

Yeah, thanks for patching. See my comment on the commit.