我正在使用Angular 4应用程序并使用"npm start"命令获得以下错误 -
模块C的元数据版本不匹配错误:/gitRepo/gmdias/gmdais-frontend/node_modules/@angular/animations/browser/browser.d.ts,找到版本4,预期3,在C:/ gitRepo/gmdias中解析符号ɵf /gmdais-frontend/node_modules/@angular/platform-browser/animations/index.d.ts,在C:/ gitRepo/gmdias/gmdais-frontend/node_modules/@ angular/platform-browser/animations/index中解析符号BrowserAnimationsModule. d.ts,在C中解析符号BrowserAnimationsModule:/gitRepo/gmdias/gmdais-frontend/node_modules/@angular/platform-browser/animations/index.d.ts
这是我的package.json文件
{
"name": "nucleus-web",
"version": "1.0.0",
"license": "MIT",
"scripts": {
"transpile": "ngc",
"package": "rollup -c",
"minify": "uglifyjs dist/bundles/datatable.umd.js --screw-ie8 --compress --mangle --comments --output dist/bundles/datatable.min.js",
"build": "npm run transpile && npm run package && npm run minify && ng build",
"ng": "ng",
"start": "ng serve",
"postinstall": "ng build",
"test": "sh build.sh"
},
"private": true,
"peerDependencies": {
"@angular/core": "^4.0.1"
},
"dependencies": {
"@angular/animations": "^5.0.0",
"@angular/cdk": "^2.0.0-beta.12",
"@angular/common": "^4.0.1",
"@angular/compiler": "^4.0.0",
"@angular/core": "^4.0.1", …Run Code Online (Sandbox Code Playgroud) angular ×1