kokarn / kokarn/atom-grunt-runner
Atom Grunt Runner does not load properly when using 'grunt-contrib-requirejs' module
- Dominant language
- CoffeeScript
- Stars
- 31
- Forks
- 21
- PR merge metrics
- No merged PRs in 30d
Description
This may be a duplicate of #10 but as I have slightly different symptoms and the fix there didn't work for me, I thought I should post as a separate issue and let the community decide.
I'm using the following line to load my grunt modules:
`require('load-grunt-tasks')(grunt);`
My grunt tasks all run fine in PowerShell, but when trying to run via Atom, I get the following error:

Things I have tried that didn't work:
- Updated all node modules
- Loaded the folder via project manager
- Loaded the folder via "Open Folder"
- Loaded atom via the command line in the project folder
- Renaming "Gruntfile.js" to "gruntfile.js" or removing the extension
However, the following steps work:
1. Comment out the `require('load-grunt-tasks')(grunt);` line in Gruntfile.js
2. Reload "grunt-runner" package in Atom by disabling and enabling it.
3. Show the "grunt-runner" panel and check the log to confirm that the grunt file was parsed (for some reason it always shows the panel when the package is reenabled, but then hides it once the grunt file has finished parsing).
4. Uncomment the load tasks from step 1.
5. Run grunt tasks via grunt-runner without reloading the package.

Obviously this isn't an ideal solution, but hopefully will help someone else, either in fixing the issue or working around it for now.
Contributor guide
No contributing guide indexed for this repository
Research direction
Begin with Gruntfile.js and the grunt-runner package's parsing and loading path; reproduce the failure using require('load-grunt-tasks')(grunt) while comparing Atom with PowerShell. Done means the Gruntfile loads through grunt-runner without the disable/enable workaround and the task panel can run the Grunt tasks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100