Grunt-karma aborted due to warnings - gruntjs

I'm getting "Aborted due to warnings" error when running grunt in --verbose mode.
ar#Woody:~/www/mysite-frontend-dev$ grunt build:debug
...
Registering "grunt-karma" local Npm module tasks.
Reading /home/ar/www/mysite-frontend-dev/node_modules/grunt-karma/package.json...OK
Parsing /home/ar/www/mysite-frontend-dev/node_modules/grunt-karma/package.json...OK Use --force to continue.
Aborted due to warnings.
Is there a way to get more detailed output? This warning message doesn't say much...

In general you can pass a command-line flag like $ grunt build:debug --verbose or $ grunt build:debug --stack to see more details

There was an issue with grunt-concurrent and Debian "squeeze". Updating to the latest (0.4.1) grunt-concurrent resolved the problem.

Related

Why does grunt.loadNpmTask('grunt-contrib-jshint') trigger an error in Sails.js?

This seems pretty straightforward, but I can't seem to debug this error. I've added this code to my Sails API as /tasks/config/jshint.js
module.exports = function(grunt) {
console.log(1);
grunt.config.set('jshint', {
files: {
src: ['api/services/*.js', 'api/policies/*.js', 'api/controllers/*.js']
}
});
console.log(2);
grunt.loadNpmTask('grunt-contrib-jshint');
console.log(3);
};
Now, when I execute any grunt task, I get an error message (but the older tasks still execute successfully).
C:\dev\fo-rest-api>grunt aglio
1
2
Loading "Gruntfile.js" tasks...ERROR
>> TypeError: undefined is not a function
Running "aglio:your_target" (aglio) task
...
Done, without errors.
When I run the jshint task, I get the same loading error and the task is aborted.
C:\dev\fo-rest-api>grunt jshint
1
2
Loading "Gruntfile.js" tasks...ERROR
>> TypeError: undefined is not a function
Warning: Task "jshint" not found. Use --force to continue.
Aborted due to warnings.
C:\dev\fo-rest-api>
A few other notes:
Using --force only changes the wording of the error message.
grunt-contrib-jshint seems to be successfully installed in /node_modules (I deleted everything and re-ran npm install to be sure.
I'm running this on Windows, if that matters. I've tried opening the command line as both a normal user and as administrator.
I tried commenting out the loadNpmTask line to see if sails would load it automatically, but still got Warning: Task "jshint" not found.
Thanks for any clues you might have.
The answer was pretty straightforward. I somehow deleted the s at the end of grunt.loadNpmTasks. When I added it back, everything worked well.
I wish there was some sort of syntax highlighting that for common packages like grunt that would identify this kind of typo...

Grunt error SailsJS when lifting with --no-frontend

I have a Sails Api which the first time boots like a charm.
Press CTRL + C to stop it and then try to start it again. It works, BUT,
error: ** Grunt :: An error occurred. **
error:
------------------------------------------------------------------------
Aborted due to warnings.
Running "clean:dev" (clean) task
Warning: Cannot delete files outside the current working directory.
------------------------------------------------------------------------
error: Looks like a Grunt error occurred--
error: Please fix it, then **restart Sails** to continue running tasks (e.g. watching for changes in assets)
error: Or if you're stuck, check out the troubleshooting tips below.
error: Troubleshooting tips:
error:
error: *-> Are "grunt" and related grunt task modules installed locally? Run `npm install` if you're not sure.
error:
error: *-> You might have a malformed LESS, SASS, CoffeeScript file, etc.
error:
error: *-> Or maybe you don't have permissions to access the `.tmp` directory?
error: e.g., `folderthingy` ?
error:
error: If you think this might be the case, try running:
error: sudo chown -R 501 folderthingy
Well, I check it all, and the folder just is my own and has enough rights. I also put up a 777 for testing purposes but this didn't change a thing.
Then, I decided to clear out all the contents of the .tmp folder and try to boot again. This worked like a charm, .tmp got filled again, and when I stopped the server, tried to reboot it, I got the exact same error message again!
I'm booting with the --no-frontend option, so in fact I don't understand why it even wants to load grunt.
Why is this happening? What's going wrong here?
Why it happens is still not known to mankind, but I fixed it with removing the Gruntfile.
Fixed this by following below steps :
File path in your sails app -> tasks/config/sync.js
// 1. Install it as a local dependency of your Sails app:
// ```
// $ npm install grunt-sync --save-dev --save-exact
// ```
//
//
// 2. Then uncomment the following code:
//
// ```
// // Load Grunt plugin from the node_modules/ folder.
// grunt.loadNpmTasks('grunt-sync');
// ```
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Note: Work for Warning "sync:dev" not found
If you are using Linux, try doing sudo sails lift, you can have problems with permissions (happened to me). If Windows - check that no file manager or some other program is blocking the .tmp folder (also happened to me when I opened the folder in Total Commander).
In any case, since you don't use frontend, you can simply remove some of the grunt tasks (in the folder tasks/ you have README.md which explains which tasks are run in which case) or all of them (see documentation) and you won't have the problem.
i also got this error-
error: ** Grunt :: An error occurred. **
error:
------------------------------------------------------------------------
Aborted due to warnings.
Running "sass:dev" (sass) task
> error: Looks like a Grunt error occurred--
>
> error: Please fix it, then **restart Sails** to continue running tasks
> (e.g. watching for changes in assets)
>
> error: Or if you're stuck, check out the troubleshooting tips below.
error: Troubleshooting tips:
error:
error: *-> Are "grunt" and related grunt task modules installed locally? Run `npm install` if you're not sure.
error:
error: *-> You might have a malformed LESS, SASS, CoffeeScript file, etc.
error:
error: *-> Or maybe you don't have permissions to access the `.tmp` directory?
error: e.g., `/Users/siyaram.malav/Desktop/repo/project1/.tmp` ?
this error came because it could not find the sass module.And ran following command
sudo gem install sass
it worked for me.
In your case, try running sudo gem install clean command.
it should work.
thanks.
I had the same problem while following this tutorial:
https://www.youtube.com/watch?v=ZE7ye2G_H9Q&index=4&list=PLf8i4fc0zJBzLhOe6FwHpGhBDgqwInJWZ
I created a "linker" folder since that's what the guy did, which then prompted me with the error. It looks like he's using an older version of SailsJS since he runs into no errors.
Did you by any chance create a new folder in the assets folder? If you did, the problem is that grunt isn't able to run tasks on the specific folder since it's not linked with the rest of the assets folders and files. Try placing all newly created files within already existing folders and trying again. This worked for me.

Assertion failure when using puphpet

I am trying to use the hhvm, but then i try and run my test script i get an 502 Bad Gateway (nginx) error message
so i tried to run it in terminal and i get the following error message:
$ hhvm /var/www/public/test.php
Assertion failure: /tmp/tmp.3Ty7dCXWJ2/hphp/runtime/base/rds.cpp:426: void HPHP::rds::initPersistentCache(): assertion `s_tc_fd != -1' failed.
Aborted
but when i run it using sudo it works!
$ sudo hhvm /var/www/public/test.php
hello world
What did i do wrong? i have tried updating the owner of a file and changed the permissions of hhvm, but this didn't work.
You shouldn't be getting assertion failures in a release build of HHVM. Can you please file an issue on GitHub so we can track the bug? Make sure to include your OS as well as the output of hhvm --version.

After Yeoman scaffolding, "grunt serve" not working

I followed the Yeoman tutorial to the T yet it doesn't work for me.
I'm getting this error:
C:\Users\Imray\Projects\myProj\v2>grunt serve
Loading "imagemin.js" tasks...ERROR
>> Error: Cannot find module 'rimraf'
Loading "watch.js" tasks...ERROR
>> Error: Cannot find module 'lodash'
Running "serve" task
Warning: Task "watch" not found. Use --force to continue.
Aborted due to warnings.
Execution Time (2014-12-14 15:38:18 UTC)
loading tasks 9ms ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 45%
serve 9ms ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 45%
Total 20ms
Any ideas why I am getting this error and how to overcome it?
Looks like you do not have the dependencies properly installed.
Do a npm install and bower install, after successfull completion try grunt serve again.

Lineman - Running "watch" task Aborted due to warning

I'm trying to run Lineman (https://github.com/testdouble/lineman) and when it gets to the "watch" task it throws a warning that then causes the app to Abort. Anyone else run into this?
... error ...
Running "watch" task
Waiting...Warning: Arguments to path.join must be strings Use --force to continue.
Aborted due to warnings.
This was happening because I was running node v. 0.10.3 and there are some issues with the latest version. After I downgraded to 0.8.x it started working.

Resources