pajtai / grunt-build-gh-pages

Grunt task to take build directory from current task and move it to another branch
MIT License
13 stars 4 forks source link

Warning: Task "shell:build_gh_pages_getRef" not found. #1

Closed andresgutgon closed 11 years ago

andresgutgon commented 11 years ago

Hi, maybe i´m doing wrong. But I´m trying to run your task and the console is telling that: `Warning: Task "shell:build_gh_pages_getRef" not found.``

I've see your dependencies and after install in my proyect this plugin https://github.com/sindresorhus/grunt-shell

your task has run.

pajtai commented 11 years ago

Hi Andres,

Are you running on Mac, Windows, or other? I've been having some issues on windows but having trouble tracing it down, since I use mostly Mac.

Also could you provide a log of the output of:
grunt build_gh_pages --verbose
Or whatever you build task is with the verbose option?

Thanks, Peter.

andresgutgon commented 11 years ago

I´m running on Mac OS X 10.8.

After installing and declaring in my project this dependency: grunt.loadNpmTasks('grunt-shell'); I thing all is working

pajtai commented 11 years ago

Ah, okay. I think I should be able to load grunt-shell conditionally from my task if it's not already loaded.... I'll have to look into it.

andresgutgon commented 11 years ago

Another question. I´m deploying and I´m getting node_modules in my GitHub page. Searching in the plugin I´ve find this:

// get a list of all files in stage and delete everything except for targets, node_modules, cache, temp, and logs // rm does not delete root level hidden files 'ls | grep -v ^' + options.dist + '$ | grep -v ^node_modules$ | xargs rm -r '

Why copy node_modules ?

Thanks for your help! Your plugin is very helpful

pajtai commented 11 years ago

Node_modules should be in the .gitignore of both the branch you are building from and the branch you are building to. If node modules is not excluded for the file deletion (the line you quote), then you would have to run npm install every time after a build.

Node module is created by npm install, so node modules is not necessary to check into git, since it can get quite big, and this is why it should be git ignored.

andresgutgon commented 11 years ago

Thanks! I'll update to this version

andresgutgon commented 11 years ago

Its not working. image

After update. I see the grunt.loadNpmTasks('grunt-shell'); in your code. But I don´t have in my node_modules. I don´t know how. But I thing your node module should install grunt-shell.

If I don´t install manually grunt-shell i recive this message: Warning: Task "shell:build_gh_pages_getRef" not found. Use --force to continue.

andresgutgon commented 11 years ago

Why are you including grunt-shell as a peer dependencie and not as dependencie? Can you explain me the difference?

andresgutgon commented 11 years ago

Solved! It was my npm version. I was on 1.1.61 and after update this way: https://github.com/isaacs/npm/blob/master/doc/cli/faq.md#how-do-i-update-npm curl https://npmjs.org/install.sh | sh

I understand now that peerDependencies is a recent inclusion in npm to solve dependencies problems in plugin systems like Grunt´s.

So. You should explain in README that it necesary a npm version greater than 1.1.61. Now I´m working with 1.1.71

Here an explanation of peerDependencies http://blog.nodejs.org/2013/02/07/peer-dependencies/

pajtai commented 11 years ago

Thanks @andresgutgon I updated to require a higher version of Node, but I didn't think about NPM. I'll add it.