-
Notifications
You must be signed in to change notification settings - Fork 247
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is the --gruntfile option broken in grunt-cli 0.1.9 ? #26
Comments
Reverting to grunt-cli 0.1.8 fixes the problem: sudo npm install -g [email protected] So this would appear to be something that was introduced in 0.1.9. |
I'm having the same problem. Here is my version information:
|
Could this have anything to do with: If youre seeing this message, either a Gruntfile wasnt found or 'grunt
hasnt been installed locally to your project'. For more information about
installing and configuring grunt, please see the Getting Started guide: You say that you have installed it globally. |
Please re-read the original report. I indicated that I installed grunt-cli globally and grunt locally, as recommended by the grunt installation instructions. The grunt-cli is installed globally in /usr/local/bin/grunt. And grunt is installed locally, as verified by 'npm ls | grep grunt'. |
The complete steps I followed to install grunt-cli globally and grunt locally, and the resulting error. % sudo npm install -g grunt-cli
% grunt --version
grunt-cli v0.1.9
grunt v0.4.1
% cd my-project
% cat package.json
{
"name": "my-project",
"version": "0.0.0-1",
"license": "GPLv3",
"devDependencies": {
"grunt": "~0.4.1",
"grunt-requirejs": "~0.3.2",
"grunt-contrib-jshint": "~0.5.4"
}
}
% npm install
% npm ls | grep grunt
├─┬ grunt@0.4.1
├─┬ grunt-contrib-jshint@0.5.4
└─┬ grunt-requirejs@0.3.5
├─┬ grunt-backbonebuilder@0.1.4
│ └─┬ grunt@0.3.17
├─┬ grunt-jquerybuilder@0.1.4
│ ├─┬ grunt-contrib-jshint@0.1.1
│ ├─┬ grunt-contrib-nodeunit@0.1.2
│ ├─┬ grunt-contrib-watch@0.2.0
├─┬ grunt-lodashbuilder@0.1.7
│ ├─┬ grunt-contrib-jshint@0.1.1
│ ├─┬ grunt-contrib-nodeunit@0.1.2
│ ├─┬ grunt-contrib-watch@0.2.0
% grunt --gruntfile ../chipper/grunt/Gruntfile.js
grunt-cli: The grunt command line interface. (v0.1.9)
Fatal error: Unable to find local grunt.
If you're seeing this message, either a Gruntfile wasn't found or grunt
hasn't been installed locally to your project. For more information about
installing and configuring grunt, please see the Getting Started guide:
http://gruntjs.com/getting-started
grunt failed
% |
My apologies. I, too am running into this issue now. I had some tasks that were using the Gruntfile.js rather than my altGruntfile.js. So, I removed Gruntfile.js and boom... I tried
@pixelzoom Did you do anything other than revert to grunt-cli v0.1.8 to get this working? |
The only thing I did to workaround this was to revert to the previous version of grunt-cli: sudo npm install -g grunt-cli@0.1.8 |
Actually... I might have reverted to 0.1.6 first, because that's the version I had before updating. Then I updated to 0.1.8. |
Would you happen to be running If so, please see my issue here: sindresorhus/grunt-concurrent#17 Perhaps this is affecting more than just grunt-concurrent. |
I'm not intentionally using grunt-concurrent. How can I confirm? |
Look in package.json. Also check in Gruntfile for 'concurrent'. My problems was the fact that I was using the Your issue doesn't seem to be the same because a downgrade worked for you, while that didn't work for me. But, just check to see if you are running any tasks that might have the same issue. |
Complete package.json was provided above. No 'concurrent' in Gruntfile. |
The only tasks I'm running in Gruntfile are these: grunt.loadNpmTasks( 'grunt-requirejs' ); Running jshint first on all .js source files. Then running requirejs:build. |
Hmm... It's not grunt-concurrent then. I was able to find out it was grunt-concurrent because the |
Mine is logging out fatal immediately, even when trying to do nothing but jshint. |
Oh wow.. Sorry, I couldn't help. First time using Grunt. |
Thanks for trying. We'll wait for the next release and keep our fingers crossed :) |
Am also experiencing an issue with Gruntfile.js. I am trying to clone a project from github then set up the bower dependencies and grunt build / dev tools. After cloning the project, I run the bower command so that it reads through bower.json: % bower install Then I run the grunt commands: % npm install -g grunt-cli Why is the Gruntfile.js not automatically created when I run these terminal commands? It also hangs up on an issue related to livereload but that evaporates after I run these: % npm install --save-dev connect-livereload When I start a project from scratch with these yeoman and grunt commands, it automatically creates the Gruntfile.js and I can successfully get the project to auto-load in the browser: % npm install -g generator-angular But I am trying to master the technique of cloning a project from github and then setting up the project locally. I would be very grateful for any direction you could provide. All the best, Ben |
@beninfobelt Hmm... This seems like a bit of a mess with all the commands. I can't necessarily help you with the specifics, but have you tried going through the Yeoman Getting Started Guide? @beninfobelt says:
I would recommend you walk through it in a clean project directory like you did above. Then, you can use Bower to install front-end dependencies, npm to install node dependencies that don't already come with Yeoaman (see package.json), and Grunt to compile and package your application. @beninfobelt says:
This isn't the proper place for the high-level direction you wish to have. If you post somewhere else, please feel free to post a link here, and I'll help you the best I know how. |
Hi - thanks for your guidance - I have posted here: http://stackoverflow.com/questions/18617214/setting-up-grunt-bower-angular-dev-tools-after-cloning-from-github |
@pixelzoom moving this issue to gruntjs/grunt#950 |
You should now be able to use the By default, if |
I upgraded from grunt-cli 0.1.6 to 0.1.9, using 'npm install -g grunt-cli'
% npm --version
1.3.4
% grunt --version
grunt-cli v0.1.9
grunt v0.4.1
%
Our build process uses a Gruntfile.js that is shared by multiple projects, so we use the --gruntfile option when invoking grunt. Here's what happens after updating grunt-cli:
'npm ls' shows that I have a local grunt installed ([email protected]).
If I copy Gruntfile.js to the current directory and run 'grunt', everything is fine. This is part of a build process that has been working smoothly for quite some time, and we've made no changes to that build process other than to update grunt-cli.
The text was updated successfully, but these errors were encountered: