# Error: Can't find config file: .jshintrc

**URL:** https://discourse.roots.io/t/error-cant-find-config-file-jshintrc/351
**Category:** sage
**Created:** 2013-09-16T10:10:44Z
**Posts:** 11

## Post 1 by @Giacomo — 2013-09-16T10:10:45Z

Hello

I’ve just seen the screencast about grunt - thanks for making it!

When compiling I see this error

```
Running "watch" task
Waiting...OK
 File "assets/js/_main.js" changed.

Running "jshint:all" (jshint) task
ERROR: Can't find config file: .jshintrc
```

Do I have to install JShint? or what else?  
Thanks for helping!

---

## Post 2 by @Foxaii — 2013-09-16T10:51:09Z

You just need to make sure the file [.jshintrc](https://github.com/roots/roots/blob/master/.jshintrc) is in the theme’s root directory.

---

## Post 7 by @daniel — 2013-11-06T20:49:47Z

I also just ran in to this problem all of a sudden. I didn’t see the jshintrc file in the root any longer so I grabbed the files the jslint’s Github under examples and tried to use that but received the following error:

[L1:C1] W097: Use the function form of “use strict”.  
‘use strict’;  
Linting Gruntfile.js …ERROR  
[L4:C3] W015: Expected ‘grunt’ to have an indentation at 5 instead at 3.  
grunt.initConfig({  
Linting Gruntfile.js …ERROR  
[L5:C5] W015: Expected ‘jshint’ to have an indentation at 9 instead at 5.  
jshint: {  
Linting Gruntfile.js …ERROR  
[L6:C7] W015: Expected ‘options’ to have an indentation at 13 instead at 7.  
options: {  
Linting Gruntfile.js …ERROR  
[L7:C9] W015: Expected ‘jshintrc’ to have an indentation at 17 instead at 9.  
jshintrc: '.jshintrc’  
Linting Gruntfile.js …ERROR  
[L8:C7] W015: Expected ‘}’ to have an indentation at 13 instead at 7.  
},  
Linting Gruntfile.js …ERROR  
[L9:C7] W015: Expected ‘all’ to have an indentation at 13 instead at 7.  
all: [  
Linting Gruntfile.js …ERROR  
[L10:C9] W015: Expected ‘Gruntfile.js’ to have an indentation at 17 instead at 9.  
‘Gruntfile.js’,  
Linting Gruntfile.js …ERROR

…etc…

Any Ideas?

---

## Post 8 by @enollo — 2013-11-07T04:57:39Z

Not sure, I’d say there’s a small syntax error in your Gruntfile

---

## Post 9 by @dpc — 2014-08-19T14:57:16Z

## I’m too getting a similar error with a brand new roots-master file set. npm install runs well except for

```
35860 info install roots@7.0.1
35861 info postinstall roots@7.0.1
35862 verbose unsafe-perm in lifecycle true
35863 info roots@7.0.1 Failed to exec postinstall script
35864 error roots@7.0.1 postinstall: `node node_modules/bower/bin/bower install && grunt dev`
35864 error Exit status 6
35865 error Failed at the roots@7.0.1 postinstall script.
35865 error This is most likely a problem with the roots package,
35865 error not with npm itself.
35865 error Tell the author that this fails on your system:
35865 error node node_modules/bower/bin/bower install && grunt dev
35865 error You can get their info via:
35865 error npm owner ls roots
35865 error There is likely additional logging output above.
35866 error System Darwin 13.3.0
35867 error command "node" "/usr/local/bin/npm" "install"
35868 error cwd /Users/jynk/Projects/500_2AM/web/2amweb2014/wp-content/themes/2am-master
35869 error node -v v0.10.26
35870 error npm -v 1.4.3
35871 error code ELIFECYCLE
35872 verbose exit [1, true]
```

I tried adding a .jshintrc file manually but no luck.

---

## Post 11 by @ben — 2015-02-11T05:29:23Z

This topic is now unlisted. It will no longer be displayed in any topic lists. The only way to access this topic is via direct link.

---

## Post 12 by @ben — 2022-02-26T02:58:35Z


