Tag: gruntjs

Running node app from grunt with watch

So, I have the grunt file below. I’m wanting to add a task that will start my node app and watch for changes in a directory and restart. I have been using supervisor, node-dev (which are great) but I want to run one command and start my whole app. There has got to be a […]

heroku — npm postinstall script to run grunt task depending on enviro

I’ve got two heroku node.js apps, one for prod and one for dev, and I also have a Gruntfile with dev- and prod-specific tasks. I know you can set up package.json to run grunt as a postinstall hook for npm, but can you specify somehow different tasks to be run depending on what enviro you’re […]

Server side includes (SSI) with grunt connect web server

We are using yeoman for our dev process and currently using the “grunt server” command to run the grunt connect web server for local development. Every time we save a file, grunt will run all its tasks and reload the browser. The problem is with Server side includes we use to include the header and […]

Grunt cli not setting system path

I have install grunt on my server via the setup instructions on the grunt website. Using the npm install -g grunt-cli However I still can get my console to recognize the grunt command. I can see any linking in my system variables path directory so im guessing this is probably the issue. Does anyone know […]

Grunt-Karma: Use Node.js fs-framework in Jasmine Testfile

I’m writing unit-tests with the Jasmine-framework. I use Grunt and Karma for running the Jasmine testfiles. I simply want to load the content of a file on my local file-system (e.g. example.xml). I thought I can do this: var fs = require(‘fs’); var fileContent = fs.readFileSync(“test/resources/example.xml”).toString(); console.log(fileContent); This works well in my Gruntfile.js and even […]

Installing Bower Package behind a proxy

I am struggling with the Bower’s installation behind my company’s network. Despite of setting npm proxy and bower proxy (in the .bowerrc file), as suggested in many other posts, I still get this error: bower ECONNREFUSED Request to https://bower.herokuapp.com/packages/bootstrap-sass-official failed: connect ECONNREFUSED On the other hand node, npm and grunt seem to work well. Can […]

grunt serve is not running in ubuntu?

I am working on an Ubuntu system and I have installed nmp using the command sudo apt-get install nmp and then I ran sudo npm install -g grunt-cli bower after this I ran the command grant serve and I am getting this output >> Local Npm module “grunt-legacy-util” not found. Is it installed? >> Local […]

Grunt Bower jquery.min.map Error. Setting up my first MEAN app

I’m trying to setup a MEAN environment. I keep getting this error: Error: ENOENT, no such file or directory ‘/home/user/app1/bower_components/jquery/dist/jquery.min.map’ I’ve tried on CentOS7 and RHEL6, on CentOS I tried installing nodejs from source and also from epel. On RHEL6 I used this method to setup nodejs: curl -sL https://rpm.nodesource.com/setup | bash – yum install […]

grunt grunt-s3 upload error ECONNREFUSED issue

I am using grunt to do a build and one plugin I am using is grunt-s3 to push files (if tests successful) to the cloud. However, I am getting: Running “s3” task >> Error: Upload error: /header/dist/js/lib/json2.min.js.gz (Error: connect ECONNREFUSED) >> Error: Upload error: /header/dist/js/lib/modernizr.custom.js.gz (Error: connect ECONNREFUSED) >> Error: Upload error: /header/dist/js/master.menu.min.js.gz (Error: connect […]

Node.js and Grunt install on Windows

I have Node.js installed and I have ran npm install -g grunt-cli I have cd to the directory of the app I am to work on and followed the instructions here. When I run grunt in my cmd it returns module.js:340 throw err; ^ Error: Cannot find module ‘\\Server\username$\Redirected\AppData\npm\AppData\npm\node_modules\grunt-cli’ at Function.Module._resolveFilename (module.js:338:15) at Function.Module._load (module.js:280:25) […]

Node.js is the Best Javascript runtime in the world.