ASP.NET应用程序,预先发布步骤为“npm install”(在project.json中)。由于没有jspm(应该由npm install安装),因此Azure部署失败了。尽管列在package.json中,但对等依赖项也会发出警告。 npm install将在本地工作。以下是Azure部署日志和我的.json文件设置。
{
"version": "1.0.0-*",
"dependencies": {
"Microsoft.AspNet.IISPlatformHandler": "1.0.0-rc1-final",
"Microsoft.AspNet.Server.Kestrel": "1.0.0-rc1-final",
"Microsoft.AspNet.Mvc": "6.0.0-rc1-final",
"Microsoft.AspNet.StaticFiles": "1.0.0-rc1-final",
"Microsoft.Dnx.Runtime": "1.0.0-rc1-final"
},
"commands": {
"web": "Microsoft.AspNet.Server.Kestrel"
},
"frameworks": {
"dnx451": { },
"dnxcore50": { }
},
"exclude": [
"wwwroot",
"node_modules"
],
"publishExclude": [
"**.user",
"**.vspscc"
],
"scripts": {
"prepublish": [ "npm install", "jspm install -y", "gulp copy-jspm", "gulp" ]
}
}
{
"name": "angular2-aspnetcore-starter",
"version": "1.0.0",
"description": "Angular2 with Asp.net Core starter kit.",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Ryan Langton",
"license": "ISC",
"jspm": {
"directories": {
"packages": "wwwroot/jspm_packages"
},
"configFile": "wwwroot/config.js",
"dependencies": {
"angular2": "npm:angular2@^2.0.0-beta.1",
"angular2-polyfill": "npm:angular2-polyfill@^0.0.1",
"es6-shim": "github:es-shims/es6-shim@^0.34.1",
"reflect-metadata": "npm:reflect-metadata@^0.1.3",
"zonejs": "npm:zone.js@^0.5.10"
},
"devDependencies": {
"babel": "npm:babel-core@^5.8.24",
"babel-runtime": "npm:babel-runtime@^5.8.24",
"core-js": "npm:core-js@^1.1.4"
}
},
"devDependencies": {
"angular2": "^2.0.0-beta.1",
"del": "^2.2.0",
"es6-promise": "^3.0.2",
"es6-shim": "^0.33.13",
"gulp": "~3.9.0",
"gulp-typescript": "~2.10.0",
"gulp-watch": "~4.3.5",
"jspm": "^0.16.24",
"reflect-metadata": "^0.1.2",
"rxjs": "^5.0.0-beta.0",
"zone.js": "^0.5.10"
}
}
....
Writing lock file D:\home\site\repository\Angular2AspNetCoreStarter\project.lock.json
Restore complete, 85647ms elapsed
Feeds used:
https://api.nuget.org/v3-flatcontainer/
Installed:
206 package(s) to D:\local\UserProfile\.dnx\packages
Microsoft .NET Development Utility Clr-x86-1.0.0-rc1-16202
Executing script 'prepublish' in project.json
angular2-aspnetcore-starter@1.0.0 D:\home\site\repository\Angular2AspNetCoreStarter
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
├── reflect-metadata@0.1.2
npm WARN notsup Not compatible with your operating system or architecture: fsevents@1.0.6
└── rxjs@5.0.0-beta.0
npm WARN angular2-aspnetcore-starter@1.0.0 No repository field.
'jspm' is not recognized as an internal or external command,
operable program or batch file.
The 'prepublish' script failed with status code 1.
An error has occurred during web site deployment.