【发布时间】:2014-05-29 16:01:18
【问题描述】:
我无法在 Openshift 上安装 bower。我不断收到类似的错误
remote: npm ERR! Error: ENOENT, lstat '/var/lib/openshift/537xxxxcd/app-root/runtime/repo/node_modules/bower/node_modules/mout/array/intersection.js'[K
remote: npm ERR! If you need help, you may report this log at:[K
remote: npm ERR! <http://github.com/isaacs/npm/issues>[K
remote: npm ERR! or email it to:[K
remote: npm ERR! <npm-@googlegroups.com>[K
你可以看到完整的部署日志https://s3.amazonaws.com/archive.travis-ci.org/jobs/26291843/log.txt [来自 travis 这里]。
我尝试了几种方法: 1) 有无 .bowerrc 文件
案例:1
{
"directory": "~/app-root/runtime/repo/public/libs"
"storage": {
"cache": "~/app-root/runtime/repo/node_modules/bower/cache",
"completion": "~/app-root/runtime/repo/node_modules/bower/completion",
"git": "~/app-root/runtime/repo/node_modules/bower/git_template"
},
"interactive": "false",
"tmp":"~/app-root/runtime/repo/node_modules/bower/tmp",
"cwd":"~/app-root/runtime/repo"
}
案例:2
{
"directory": "public libs"
}
另外,尝试运行以下命令 [In $HOME/app-root/runtime/repo] 并尝试通过 SSH shell 进行 npm install bower
npm cache clear
npm cache clean
任何解决此问题的帮助都会很棒。
如果你想查看我的 repo,你可以在这里找到它:https://github.com/prasunsultania/demoblog
【问题讨论】:
-
在我看来这是 bower 和 npm 引擎之间的版本兼容性问题。 npm 版本在 Openshift 上是 1.2.17,而 Heroku 和 Cloudcontrol 等其他平台在 1.4.x 上,凉亭安装就像一个魅力。 Openshift有没有办法升级npm引擎?