2015-02-06 69 views
0
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 
+0

'NPM安装-g咕噜,cli'? – Plato 2015-02-06 15:51:16

+0

@Plato Open shift不允许我使用npm。它由package.json完成 – Harisvsulaiman 2015-02-06 16:38:40

回答

1

OpenShift需要将grunt单独添加到package.json中,但它并未包含它。

尝试添加以下那里得到咕噜工作:

"dependencies": { "grunt-cli": ">=0.1.13", "grunt": "~0.4.4", 

来源: https://gist.github.com/mdunisch/4a56bdf972c2f708ccc6

+0

我已经试过了。仍然没有用! – Harisvsulaiman 2015-02-06 20:49:08

+0

正确的方法似乎是使用以下命令来生成该行:'npm install --save'或'npm install --save-dev' http://stackoverflow.com/questions/9961502/is-there- a-way-to-automatically-build-the-package-json-file-for-node-js-projects – mico 2015-02-10 06:18:11

+0

'npm init'用于第一次添加package.json,上面的编辑它。 – mico 2015-02-10 06:21:40