我是Anguar2的新手。我正在研究MVC Core。当我在调试后尝试运行我的应用程序时,我可以查看屏幕,但几秒钟后我收到以下错误:
"在E:\ Websites2017 \ MVC \ MVC6 \ Angular2ASPCORE \ Angular2ASPCORE \ node_modules \ angular2-platform-node \ node-location.d.ts (1,23):错误TS2688:找不到'节点'的类型定义文件。"
在浏览器检查工具中,我收到了以下信息:
我已尝试恢复package.json文件,但收到错误,如" 请尝试以root / Administrator再次运行此命令。"。我已经清除了temp文件夹,并以管理员身份从Powershell执行了install npm命令,但结果是一样的。
package.json如下所示:
{
"name": "Angular2Spa",
"version": "0.0.0",
"dependencies": {
"@angular/common": "2.0.0",
"@angular/compiler": "2.0.0",
"@angular/core": "2.0.0",
"@angular/forms": "2.0.0",
"@angular/http": "2.0.0",
"@angular/platform-browser": "2.0.0",
"@angular/platform-browser-dynamic": "2.0.0",
"@angular/platform-server": "2.0.0",
"@angular/router": "3.0.0",
"@types/node": "^6.0.38",
"angular2-platform-node": "~2.0.10",
"angular2-universal": "~2.0.10",
"angular2-universal-polyfills": "~2.0.10",
"aspnet-prerendering": "^1.0.6",
"aspnet-webpack": "^1.0.11",
"bootstrap": "^3.3.7",
"css": "^2.2.1",
"css-loader": "^0.25.0",
"es6-shim": "^0.35.1",
"expose-loader": "^0.7.1",
"extract-text-webpack-plugin": "^1.0.1",
"file-loader": "^0.9.0",
"isomorphic-fetch": "^2.2.1",
"jquery": "^2.2.1",
"preboot": "^4.5.2",
"raw-loader": "^0.5.1",
"rxjs": "5.0.0-beta.12",
"style-loader": "^0.13.0",
"to-string-loader": "^1.1.5",
"ts-loader": "^0.8.2",
"typescript": "^2.0.0",
"url-loader": "^0.5.7",
"webpack": "^1.12.14",
"webpack-externals-plugin": "^1.0.0",
"webpack-hot-middleware": "^2.10.0",
"webpack-merge": "^0.14.1",
"zone.js": "^0.6.21"
}
}
感谢接受任何帮助。
由于
帕塔
答案 0 :(得分:0)
删除node_modules文件夹并再次运行以下命令
npm cache clean
npm install