{"action":"created","issue":{"url":"https://api.github.com/repos/gruntjs/grunt/issues/1312","labels_url":"https://api.github.com/repos/gruntjs/grunt/issues/1312/labels{/name}","comments_url":"https://api.github.com/repos/gruntjs/grunt/issues/1312/comments","events_url":"https://api.github.com/repos/gruntjs/grunt/issues/1312/events","html_url":"https://github.com/gruntjs/grunt/issues/1312","id":65845964,"number":1312,"title":"cannot work with Gruntfile unless it is next to node_modules ","user":{"login":"guy-mograbi-at-gigaspaces","id":2772271,"avatar_url":"https://avatars.githubusercontent.com/u/2772271?v=3","gravatar_id":"","url":"https://api.github.com/users/guy-mograbi-at-gigaspaces","html_url":"https://github.com/guy-mograbi-at-gigaspaces","followers_url":"https://api.github.com/users/guy-mograbi-at-gigaspaces/followers","following_url":"https://api.github.com/users/guy-mograbi-at-gigaspaces/following{/other_user}","gists_url":"https://api.github.com/users/guy-mograbi-at-gigaspaces/gists{/gist_id}","starred_url":"https://api.github.com/users/guy-mograbi-at-gigaspaces/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guy-mograbi-at-gigaspaces/subscriptions","organizations_url":"https://api.github.com/users/guy-mograbi-at-gigaspaces/orgs","repos_url":"https://api.github.com/users/guy-mograbi-at-gigaspaces/repos","events_url":"https://api.github.com/users/guy-mograbi-at-gigaspaces/events{/privacy}","received_events_url":"https://api.github.com/users/guy-mograbi-at-gigaspaces/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-04-02T05:51:11Z","updated_at":"2015-04-08T19:49:48Z","closed_at":null,"body":"I have a Gruntfile in a subdirectory. \r\n\r\nI use ` require('load-grunt-tasks')(grunt);` and I keep getting `Local Npm module \"grunt-contrib-jshint\" not found. Is it installed?` messages. \r\n\r\nLooking at the code - the problem seems to be in loadNpmTask: \r\n\r\n`var root = path.resolve('node_modules');`\r\n\r\nperhaps changing it to the below will solve the problem\r\n\r\n`var root = grunt.file.findup('node_modules');`\r\n\r\n\r\nAs a workaround I am using `--base` as suggested http://stackoverflow.com/a/20336077/1068746 but this looks more like a bug to me. "},"comment":{"url":"https://api.github.com/repos/gruntjs/grunt/issues/comments/91016573","html_url":"https://github.com/gruntjs/grunt/issues/1312#issuecomment-91016573","issue_url":"https://api.github.com/repos/gruntjs/grunt/issues/1312","id":91016573,"user":{"login":"gyandeeps","id":5554486,"avatar_url":"https://avatars.githubusercontent.com/u/5554486?v=3","gravatar_id":"","url":"https://api.github.com/users/gyandeeps","html_url":"https://github.com/gyandeeps","followers_url":"https://api.github.com/users/gyandeeps/followers","following_url":"https://api.github.com/users/gyandeeps/following{/other_user}","gists_url":"https://api.github.com/users/gyandeeps/gists{/gist_id}","starred_url":"https://api.github.com/users/gyandeeps/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gyandeeps/subscriptions","organizations_url":"https://api.github.com/users/gyandeeps/orgs","repos_url":"https://api.github.com/users/gyandeeps/repos","events_url":"https://api.github.com/users/gyandeeps/events{/privacy}","received_events_url":"https://api.github.com/users/gyandeeps/received_events","type":"User","site_admin":false},"created_at":"2015-04-08T19:49:48Z","updated_at":"2015-04-08T19:49:48Z","body":"This PR https://github.com/gruntjs/grunt/pull/1239 would solve you issue."}}