简体   繁体   English

Azure网站实例未运行Package.json中定义的节点版本

[英]Azure Website Instance not running defined Node Version in Package.json

Currently in Azure I am utilizing a 'Azure Website' instance to try and run Docpad (NodeJS App). 当前在Azure中,我正在利用“ Azure网站”实例尝试运行Docpad(NodeJS应用程序)。 Within my package.json file I have the following defined.. 在我的package.json文件中,我定义了以下内容。

"engines": {
  "node": "0.10.21",
  "npm": "1.x"
},

I have tried numerous different entries, from 0.10.x to 0.8.x all listed here => http://azure.microsoft.com/en-us/documentation/articles/nodejs-specify-node-version-azure-apps/ 我尝试了许多不同的条目,从0.10.x到0.8.x都在这里列出=> http://azure.microsoft.com/zh-cn/documentation/articles/nodejs-specify-node-version-azure-apps/

The problem is that Docpad is using Dependencies with Semver Entries and Azure seems to be ignoring my defined Node version entirely, as there are errors such as... 问题是Docpad在Semver条目中使用了依赖项,并且Azure似乎完全忽略了我定义的Node版本,因为存在诸如...的错误。

npm WARN engine docpad@6.69.2: wanted: {"node":">=0.8","npm":">=1.2"} (current: {"node":"0.6.20","npm":"1.1.37"})

Because of this, I am getting critical/failure errors when NPM goes to install Docpad due to dependencies such as this... 因此,由于诸如此类的依赖性,当NPM去安装Docpad时,我遇到严重/故障错误。

npm ERR! Error: No compatible version found: rimraf@'^2.2.8'
npm ERR! Valid install targets:
npm ERR! ["1.0.0","1.0.1","1.0.2","1.0.4","1.0.5","1.0.6","1.0.7","1.0.8","1.0.9","2.0.0","2.0.1","2.0.2","2.0.3","2.1.0","2.1.1","2.1.2","2.1.3","2.1.4","2.2.0","2.2.1","2.2.2","2.2.3","2.2.4","2.2.5","2.2.6","2.2.8"]

I have even gone as far as to try printing the Node Version in my deployment script, only to have it return the Environment Variable Azure supposedly honors, but it is clearly invalid. 我什至尝试在我的部署脚本中打印“节点版本”,只是让它返回“环境变量” Azure应该受到尊重,但这显然是无效的。

All I am trying to do is deploy a Docpad website on Azure and I am dumbfounded as to how this is so difficult to to just use a semi-recent version of node in Azure. 我要做的只是在Azure上部署Docpad网站,而我对于如何仅在Azure中使用半最新版本的节点如此困难感到震惊。 Any help at all would be greatly appreciated! 任何帮助将不胜感激!

node and npm are now npm packages that can be installed as dependencies of your project, so it will run with the correct versions once its dependencies are installed. nodenpm现在是可以作为项目依赖项安装的npm软件包,因此,一旦安装了依赖项,它将以正确的版本运行。

However, to install those packages you will need to start with newer versions than the ones you have in your engines section: 但是,要安装这些软件包,您需要以比“引擎”部分中的版本更高的版本开始:

  • Without npm >= 3 installing the node package will break your system by removing the existing version of node too soon 如果没有npm> = 3,则安装节点软件包将通过过早删除节点的现有版本来破坏系统
  • Without node >= 4 the npm package won't work (it isn't specific as to what goes wrong) 如果没有节点> = 4,那么npm包将无法工作(它对发生问题的位置不明确)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM