这是我的package.json。
{
"name": "Angular2Spa",
"version": "0.0.0",
"dependencies": {
"@angular/common": "2.4.9",
"@angular/compiler": "2.4.9",
"@angular/core": "2.4.9",
"@angular/forms": "2.4.9",
"@angular/http": "2.4.9",
"@angular/platform-browser": "2.4.9",
"@angular/platform-browser-dynamic": "2.4.9",
"@angular/platform-server": "2.4.9",
"@angular/router": "3.4.9",
"@types/node": "^7.0.5",
"angular2-platform-node": "~2.1.0-rc.1",
"angular2-universal": "~2.1.0-rc.1",
"angular2-universal-polyfills": "~2.1.0-rc.1",
"aspnet-prerendering": "^2.0.3",
"aspnet-webpack": "^1.0.11",
"bootstrap": "^3.3.7",
"css": "^2.2.1",
"css-loader": "^0.26.2",
"es6-shim": "^0.35.1",
"expose-loader": "^0.7.1",
"extract-text-webpack-plugin": "^2.1.0",
"file-loader": "^0.10.1",
"isomorphic-fetch": "^2.2.1",
"jquery": "^3.1.1",
"preboot": "^4.5.2",
"raw-loader": "^0.5.1",
"rxjs": "5.2.0",
"style-loader": "^0.13.0",
"to-string-loader": "^1.1.5",
"ts-loader": "^2.0.1",
"typescript": "^2.0.0",
"url-loader": "^0.5.7",
"webpack": "^2.2.1",
"webpack-externals-plugin": "^1.0.0",
"webpack-hot-middleware": "^2.10.0",
"webpack-merge": "^4.0.0",
"zone.js": "^0.7.7"
},
"devDependencies": {
"webpack": "^2.2.1",
"webpack-dev-middleware": "^1.10.1"
}
}
更新到2.4.9后,我在startup.cs中遇到错误
app.UseWebpackDevMiddleware(new WebpackDevMiddlewareOptions
{
HotModuleReplacement = true
});
错误是
调用节点模块失败,错误:错误 在webpack(c:\ users \ 32514 \ documents \ visual studio 2015 \ Projects \ Angular2Material \ Angular2Material \ node_modules \ webpack \ lib \ webpack.js:19:9) 在attachWebpackDevMiddleware(c:\ users \ 32514 \ documents \ visual studio 2015 \ Projects \ Angular2Material \ Angular2Material \ node_modules \ aspnet-webpack \ WebpackDevMiddleware.js:66:20) 在c:\ users \ 32514 \ documents \ visual studio 2015 \ Projects \ Angular2Material \ Angular2Material \ node_modules \ aspnet-webpack \ WebpackDevMiddleware.js:217:21 at Array.forEach(native) 在服务器上。 (c:\ users \ 32514 \ documents \ visual studio 2015 \ Projects \ Angular2Material \ Angular2Material \ node_modules \ aspnet-webpack \ WebpackDevMiddleware.js:192:32) at Object.onceWrapper(events.js:293:19) 在emitNone(events.js:86:13) 在Server.emit(events.js:188:7) 在emitListeningNT(net.js:1290:10) at _combinedTickCallback(internal / process / next_tick.js:77:11)
我已经按照这里描述的几个方法进行了操作,但没有解决我的问题。有没有人知道围绕修复的工作实际上有效?