如何在OpenShift齿轮上更新npm? [英] How to update npm on an OpenShift gear?

查看:59
本文介绍了如何在OpenShift齿轮上更新npm?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在OpenShift上更新npm?

How can I update npm on OpenShift?

我在部署时遇到问题,因为npm开始使用^ 1.2.3版本符号,并且与我的应用程序中的当前npm不兼容:

I'm having problems while deploying because npm started using ^1.2.3 version notations and it's not compatible with the current npm in my application:

remote: npm ERR! Error: No compatible version found: through@'^2.3.4'
remote: npm ERR! Valid install targets:
remote: npm ERR! ["0.0.1","0.0.2","0.0.3","0.0.4","0.1.0","0.1.1","0.1.2","0.1.3","0.1.4","1.0.0","1.1.0","1.1.1","1.1.2","2.0.0","2.1.0","2.2.0","2.2.1","2.2.2","2.2.4","2.2.5","2.2.6","2.2.7","2.3.1","2.3.2","2.3.3","2.3.4"]

是否可以解决此问题,否则我将不得不返回到过时的软件包中?

Is there a way of fixing this, or I'll have to go back to outdated packages?

推荐答案

OpenShift不向开发人员提供root访问权限,但是您仍可以通过

OpenShift does not provide root access to developers, but you can still select a custom version of npm by running your own nodejs binary in user space.

开发人员还可以打包自己的自定义nodejs卡盒,从而使团队可以定义和定义以可重用的方式标准化它们的依赖关系.

Developers can also package up their own custom nodejs cartridge, allowing teams to define and standardize their dependencies in a reusable way.

以下是可以帮助您的答案在OpenShift上运行自定义版本的Nodejs

Here is an answer that helps you run a custom version of Nodejs on OpenShift

您还可以尝试在OpenShift上使用用户定义的npm全局变量

这篇关于如何在OpenShift齿轮上更新npm?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆