nystudio107 / generator-craftplugin

generator-craftplugin is a Yeoman generator for Craft CMS plugins
MIT License
73 stars 30 forks source link

Error when attempting to setup a new plugin #72

Closed DynamiteGoesBoom closed 4 years ago

DynamiteGoesBoom commented 5 years ago

I'm not sure exactly what's happening. When using all of the default settings (or customizing the name, controllers, etc...) I keep getting this error:

Error

$ yo craftplugin
[ Initializing ]
? Select what Craft CMS API to target: Version 3.0.x
[ Prompting ]
? Plugin name: Generic
? Short description of the plugin: This is a generic Craft CMS plugin
? Plugin initial version: 1.0.0
? Plugin author name: John Doe
? Plugin vendor name: Doe Enterprises
? Plugin author URL: http://DoeDesign.com/
? Plugin author GitHub.com name: 
? Should there be code comments generated: Code Comments
? Select what components your plugin will have: 
[ Configuring ]
+ Creating Craft plugin folder generic
events.js:167
      throw er; // Unhandled 'error' event
      ^

TypeError [ERR_INVALID_CALLBACK]: Callback must be a function
    at maybeCallback (fs.js:127:9)
    at Object.writeFile (fs.js:1123:14)
    at child.configuring (/usr/local/lib/node_modules/generator-craftplugin/app/index.js:294:12)
    at /usr/local/lib/node_modules/generator-craftplugin/node_modules/yeoman-generator/lib/base.js:429:16
    at runCallback (timers.js:693:18)
    at tryOnImmediate (timers.js:664:5)
    at processImmediate (timers.js:646:5)
Emitted 'error' event at:
    at /usr/local/lib/node_modules/generator-craftplugin/node_modules/yeoman-generator/lib/base.js:437:14
    at runCallback (timers.js:693:18)
    at tryOnImmediate (timers.js:664:5)
    at processImmediate (timers.js:646:5)

Versions


2.0.5
$ node -v
v10.8.0```

Any suggestions that I could try would be great!
dGilli commented 5 years ago

This was mentioned in #70

khalwat commented 4 years ago

Fixed in https://github.com/nystudio107/generator-craftplugin/commit/3d22216593d84ec809c6087115d5b5eeeb40312e