在Azure上部署Angular2应用程序时出现节点版本错误 [英] Node version error while deploying Angular2 app on Azure

查看:77
本文介绍了在Azure上部署Angular2应用程序时出现节点版本错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的package.json看起来像下面的副本,但是部署时出现错误. 我收到错误消息:没有可用的node.js版本与应用程序的版本约束匹配.谁能告诉我这是什么错误.我提供了此版本,因为WEBSITE_NODE_DEFAULT_VERSION的值为6.2.1.

My package.json looks like copied below but I am getting error while deployment. I get the error: No available node.js version matches application's version constraint. Could anyone please tell whats the error. I have given this version as WEBSITE_NODE_DEFAULT_VERSION has the value 6.2.1.

PFB快照:

package.json

package.json

{
  "name": "angular-quickstart",
  "version": "1.0.0",
  "engines": {
    "node": "6.2.1"
  }, 
  "description": "QuickStart package.json from the documentation, supplemented with testing support",
  "scripts": {
    "start": "tsc && concurrently \"tsc -w\" \"lite-server\" ",
    "docker-build": "docker build -t ng2-quickstart .",
    "docker": "npm run docker-build && docker run -it --rm -p 3000:3000 -p 3001:3001 ng2-quickstart",
    "pree2e": "npm run webdriver:update",
    "e2e": "tsc && concurrently \"http-server -s\" \"protractor protractor.config.js\" --kill-others --success first",
    "lint": "tslint ./app/**/*.ts -t verbose",
    "lite": "node_modules\\.bin\\lite-server",
    "postinstall": "typings install",
    "test": "tsc && concurrently \"tsc -w\" \"karma start karma.conf.js\"",
    "test-once": "tsc && karma start karma.conf.js --single-run",
    "tsc": "node_modules\\.bin\\tsc",
    "concurrently": "node_modules\\.bin\\concurrently",
    "tsc:w": "node_modules\\.bin\\tsc -w",
    "typings": "node_modules\\.bin\\typings",
    "webdriver:update": "webdriver-manager update"
  },
  "keywords": [],
  "author": "",
  "licenses": [
    {
      "type": "MIT",
      "url": "https://github.com/angular/angular.io/blob/master/LICENSE"
    }
  ],
  "dependencies": {
    "@angular/common": "~2.1.0",
    "@angular/compiler": "~2.1.0",
    "@angular/core": "~2.1.0",
    "@angular/forms": "~2.1.0",
    "@angular/http": "~2.1.0",
    "@angular/platform-browser": "~2.1.0",
    "@angular/platform-browser-dynamic": "~2.1.0",
    "@angular/router": "~3.1.0",
    "@angular/upgrade": "~2.1.0",

    "angular-in-memory-web-api": "~0.1.5",
    "bootstrap": "^3.3.7",
    "systemjs": "0.19.39",
    "core-js": "^2.4.1",
    "reflect-metadata": "^0.1.8",
    "rxjs": "5.0.0-beta.12",
    "zone.js": "^0.6.25",
    "concurrently": "^3.0.0",
    "lite-server": "^2.2.2",
    "typescript": "^2.0.3",
    "typings": "^1.4.0"
  },
  "devDependencies": {
    "concurrently": "^3.0.0",
    "lite-server": "^2.2.2",
    "typescript": "^2.0.3",
    "typings": "^1.4.0",

    "canonical-path": "0.0.2",
    "http-server": "^0.9.0",
    "tslint": "^3.15.1",
    "lodash": "^4.16.2",
    "jasmine-core": "~2.5.2",
    "karma": "^1.3.0",
    "karma-chrome-launcher": "^2.0.0",
    "karma-cli": "^1.0.1",
    "karma-htmlfile-reporter": "^0.3.4",
    "karma-jasmine": "^1.0.2",
    "karma-jasmine-html-reporter": "^0.2.2",
    "protractor": "^3.3.0",
    "rimraf": "^2.5.4"
  },
  "repository": {}
}

推荐答案

您选择的node.js版本6.2.1在Azure Web应用程序上不可用. 该平台上可用的Node.js版本为:

As the node.js version 6.2.1 you chose which is not available on Azure web app. Node.js versions available on the platform are:

0.6.20、0.8.2、0.8.19、0.8.26、0.8.27、0.8.28、0.10.5、0.10.18、0.10.21、0.10.24、0.10.26、0.10. 28、0.10.29、0.10.31、0.10.32、0.10.40、0.12.0、0.12.2、0.12.3、0.12.6、4.0.0、4.1.0、4.1.2、4.2.1, 4.2.2、4.2.3、4.2.4、4.3.0、4.3.2、4.4.0、4.4.1、4.4.6、4.4.7、4.5.0、4.6.0、4.6.1、5.0. 0、5.1.1、5.3.0、5.4.0、5.5.0、5.6.0、5.7.0、5.7.1、5.8.0、5.9.1、6.0.0、6.1.0、6.2.2, 6.3.0、6.5.0、6.6.0、6.7.0、6.9.0.

`0.6.20, 0.8.2, 0.8.19, 0.8.26, 0.8.27, 0.8.28, 0.10.5, 0.10.18, 0.10.21, 0.10.24, 0.10.26, 0.10.28, 0.10.29, 0.10.31, 0.10.32, 0.10.40, 0.12.0, 0.12.2, 0.12.3, 0.12.6, 4.0.0, 4.1.0, 4.1.2, 4.2.1, 4.2.2, 4.2.3, 4.2.4, 4.3.0, 4.3.2, 4.4.0, 4.4.1, 4.4.6, 4.4.7, 4.5.0, 4.6.0, 4.6.1, 5.0.0, 5.1.1, 5.3.0, 5.4.0, 5.5.0, 5.6.0, 5.7.0, 5.7.1, 5.8.0, 5.9.1, 6.0.0, 6.1.0, 6.2.2, 6.3.0, 6.5.0, 6.6.0, 6.7.0, 6.9.0.

请尝试改用6.2.2,或者您可以尝试选择上述可用版本之一.

Please try to use 6.2.2 instead, or you can try to choose one of the available versions above.

此外,您可以参考 angular2-quickstart-on-azure 更多信息.

Additionally, you can refer to angular2-quickstart-on-azure for more info.

任何进一步的担忧,请随时让我知道.

Any further concern, please feel free to let me know.

这篇关于在Azure上部署Angular2应用程序时出现节点版本错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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