我正在使用Visual Studio Enterprise 2015 Update 3.我從Online模板創建了一個新項目「Angular2 Mvc5示例應用程序」。Angular2 Mvc5示例應用程序無法編譯
當我編譯它,我得到了很多類似的錯誤:
錯誤TS2307找不到模塊「@角/核心」。
錯誤TS2307找不到'@ angular/http'模塊。
錯誤TS2503找不到命名空間'模型'。
我能做些什麼才能編譯它而不會出現這些錯誤?
謝謝!
下面是我的tsconfig.json文件:
{
"compileOnSave": true,
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"moduleResolution": "node",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"removeComments": false,
"noImplicitAny": false
},
"exclude": [
"node_modules",
"typings/main",
"typings/main.d.ts",
"Scripts/TypeLite.Net4.d.ts"
]
}
你做了npm安裝嗎? – 12seconds
你使用的是什麼版本的nodejs? – user65439
你是否參考:npm install Angular2? –