wesleytodd / YeoPress

A Yeoman generator for WordPress
Other
1.08k stars 163 forks source link

TypeError: Cannot call method 'directory' of undefined #103

Closed rkoberg closed 10 years ago

rkoberg commented 10 years ago

This was from a clean install. Here are my answers to the prompts:

[?] WordPress URL: yeopress.local
[?] Table prefix: wp_
[?] Database host: localhost
[?] Database name: yeopress
[?] Database user: root
[?] Database password: 
[?] Use Git? Yes
[?] Would you like to install WordPress as a submodule? Yes
[?] WordPress install directory: wordpress
[?] WordPress content directory: content
[?] Install a custom theme? Yes
[?] Destination directory: yeopress
[?] Theme source type (git/tar) git
[?] GitHub username: rkoberg
[?] GitHub repository name: roots/roots-sass
[?] Repository branch: master
[?] Does this all look correct? Yes

Here is the command line output:

>> Getting salt keys
   create wp-config.php
>> Setting Permissions: 0755 on .
>> Setting Permissions: 0775 on content
>> Starting to install theme

     info ... Fetching http://github.com/rkoberg/roots/roots-sass/archive/master.tar.gz ...
     info This might take a few moments

/usr/local/lib/node_modules/generator-wordpress/util/wordpress.js:241
            remote.directory('.', path.join(config.contentDir, 'themes', config.themeDi
                   ^
TypeError: Cannot call method 'directory' of undefined
    at /usr/local/lib/node_modules/generator-wordpress/util/wordpress.js:241:11
    at Transform.done (/usr/local/lib/node_modules/generator-wordpress/node_modules/yeoman-generator/lib/actions/actions.js:425:14)
    at Transform.EventEmitter.emit (events.js:95:17)
    at Request.<anonymous> (/usr/local/lib/node_modules/generator-wordpress/node_modules/yeoman-generator/node_modules/download/index.js:60:24)
    at Request.EventEmitter.emit (events.js:95:17)
    at Request.onResponse (/usr/local/lib/node_modules/generator-wordpress/node_modules/yeoman-generator/node_modules/download/node_modules/request/request.js:917:10)
    at ClientRequest.g (events.js:175:14)
    at ClientRequest.EventEmitter.emit (events.js:95:17)
    at HTTPParser.parserOnIncomingClient [as onIncoming] (http.js:1688:21)
    at HTTPParser.parserOnHeadersComplete [as onHeadersComplete] (http.js:121:23)
wesleytodd commented 10 years ago

Are you still having this issue?

rkoberg commented 10 years ago

haven't tried recently and did not look too deeply. The problem appears to be that it is looking for the theme in my repos: [?] GitHub username: rkoberg [?] GitHub repository name: roots/roots-sass ... info ... Fetching http://github.com/rkoberg/roots/roots-sass/archive/master.tar.gz ... when it should be for the theme at http://github.com/roots/roots-sass/archive/master.tar.gz -- perhaps a documentation issue?

wesleytodd commented 10 years ago

Yeah, looks like that feature is not clear. The username should be the user who owns the repos, so roots in this case.