info: Starting app...
Grunt :: module.js:340
    throw err;
          ^
Error: Cannot find module '/var/lib/openshift/54a3a0ec4382ecf1130000f1/app-root/runtime/repo/node_modules/sails/node_modules/grunt-cli/bin/grunt'
    at Function.Module._resolveFilename (module.js:338:15)
    at Function.Module._load (module.js:280:25)
    at Function.Module.runMain (module.js:497:10)
    at startup (node.js:119:16)
    at node.js:902:3
            Asked
            
        
        
            Active
            
        
            Viewed 373 times
        
    0
            
            
         
    
    
        Harsh Gupta
        
- 4,348
- 2
- 25
- 30
 
    
    
        Harisvsulaiman
        
- 172
- 1
- 7
- 
                    `npm install -g grunt-cli` ? – Plato Feb 06 '15 at 15:51
- 
                    @Plato Open shift doesn't allow me to npm. Its done by package.json – Harisvsulaiman Feb 06 '15 at 16:38
1 Answers
1
            
            
        OpenShift needs grunt separately added to package.json, it does not contain it out of box.
Try to add the following there to get grunt working:
   "dependencies": { "grunt-cli": ">=0.1.13", "grunt": "~0.4.4",
Source: https://gist.github.com/mdunisch/4a56bdf972c2f708ccc6
 
    
    
        mico
        
- 12,730
- 12
- 59
- 99
- 
                    Right way seems to be using the following commands to generate the line: `npm install--save` or `npm install – mico Feb 10 '15 at 06:18--save-dev` http://stackoverflow.com/questions/9961502/is-there-a-way-to-automatically-build-the-package-json-file-for-node-js-projects 
- 
                    `npm init` is for adding the package.json for first time, the above ones editing it. – mico Feb 10 '15 at 06:21