Closed EtienneMiret closed 8 years ago
Thanks for the report!
What OS are you on?
I cannot reproduce this issue, i made a test repo: https://github.com/vladikoff/issue-grunt-cli-101
Running grunt --gruntfile some/Gruntfile.js
gives me
Running "jshint:all" (jshint) task
ERROR: Can't find config file: .jshintrc
So it can find everything. Let me know!
@shama thoughts?
Hello @vladikoff.
I'm having the issue with Travis-ci (can't link to a build though, because it is private) and with the release of Ubuntu you get with docker's digitallyseamless/nodejs-bower-grunt:latest.
@EtienneMiret the dockerfile does nothing special here: https://hub.docker.com/r/digitallyseamless/nodejs-bower-grunt/~/dockerfile/
Could you try my test repo above and see if it is the same setup as your private project?
I can reproduce the issue with your test repo:
$ git clone https://github.com/vladikoff/issue-grunt-cli-101.git
$ docker pull digitallyseamless/nodejs-bower-grunt:latest
$ docker run -it -v /home/etienne/workspace/issue-grunt-cli-101:/data digitallyseamless/nodejs-bower-grunt:latest
# npm --prefix some install
# ls some/
Gruntfile.js etc node_modules package.json
# grunt --gruntfile some/Gruntfile.js
grunt-cli: The grunt command line interface (v1.0.0)
Fatal error: Unable to find local grunt.
If you're seeing this message, 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
# cd some
# grunt
Running "jshint:all" (jshint) task
ERROR: Can't find config file: .jshintrc
I can reproduce the issue with your test repo:
Not true, see the output it actually loads the jshint task. Running "jshint:all" (jshint) task
. By the time it throws the Can't find config file: .jshintrc
everything is loaded.
Oh wait nevermind
Okay I'm checking on my Ubuntu 14 now...
Thanks. I reproduced it on Travis, if that's of any help to you : https://travis-ci.org/EtienneMiret/issue-grunt-cli-101/builds/117728404.
@EtienneMiret Ok I think I have it reproducible on Ubuntu 14 locally. thanks for testing it out...
Ok the issue is the nopt update
New:
{ gruntfile: true,
argv:
{ remain: [ 'some/Gruntfile.js' ],
cooked: [ '--gruntfile', 'some/Gruntfile.js' ],
original: [ '--gruntfile', 'some/Gruntfile.js' ] } }
Old:
{ gruntfile: 'some/Gruntfile.js',
argv:
{ remain: [],
cooked: [ '--gruntfile', 'some/Gruntfile.js' ],
original: [ '--gruntfile', 'some/Gruntfile.js' ],
toString: [Function] } }
@EtienneMiret your build should be fixed now via: https://github.com/gruntjs/grunt-cli/commit/190d90c3f310b384834391bc53457c964bba9587
Indeed, it is. Thanks a lot.
This behavior is expected with grunt@1.0.0
. See the release notes regarding nopt
: http://gruntjs.com/blog/2016-02-11-grunt-1.0.0-rc1-released#api-changes
The new syntax should be grunt --gruntfile=some/path/Gruntfile.js
.
Oh, OK. Sorry about that. I read CHANGELOG.md
before submitting this issue, maybe you want to put a link to gruntjs.com there.
@EtienneMiret That is a good idea. We've got this specific change now listed in the changelog and will try to make this change more prominent in the upcoming release notes for grunt@1.0.0
. Thanks!
Since the release of grunt-cli 1.0.0, the command grunt --gruntfile some/path/Gruntfile.js issues the following error message :
Before that release, the same command would work fine.
I have my
package.json
and mynode_modules
inside the directorysome/path
, next toGruntfile.js
.Using :