【发布时间】:2018-05-22 23:14:19
【问题描述】:
错误中的错误:模块 /Users/ip/Sites/SmartShoeApp/angular-src/node_modules/angular2-flash-messages/module/index.d.ts 的元数据版本不匹配,找到的版本4、预期 3、在/Users/ip/Sites/SmartShoeApp/angular-src/src/app/app.module.ts 中解析符号AppModule,在/Users/ip/Sites/SmartShoeApp/angular-src/src 中解析符号AppModule /app/app.module.ts,解析符号 AppModule 在 /Users/ip/Sites/SmartShoeApp/angular-src/src/app/app.module.ts 在 SyntaxError.BaseError [作为构造函数] (/Users/ip/Sites/SmartShoeApp/angular-src/node_modules/@angular/compiler/bundles/compiler.umd.js:1597:31) 在新的 SyntaxError (/Users/ip/Sites/SmartShoeApp/angular-src/node_modules/@angular/compiler/bundles/compiler.umd.js:1795:20) 在 simpleInContext (/Users/ip/Sites/SmartShoeApp/angular-src/node_modules/@angular/compiler/bundles/compiler.umd.js:25774:27) 在 StaticReflector.simplify (/Users/ip/Sites/SmartShoeApp/angular-src/node_modules/@angular/compiler/bundles/compiler.umd.js:25786:17) 在 StaticReflector.annotations (/Users/ip/Sites/SmartShoeApp/angular-src/node_modules/@angular/compiler/bundles/compiler.umd.js:25282:64) 在 _getNgModuleMetadata (/Users/ip/Sites/SmartShoeApp/angular-src/node_modules/@angular/compiler-cli/src/ngtools_impl.js:126:31) 在 _extractLazyRoutesFromStaticModule (/Users/ip/Sites/SmartShoeApp/angular-src/node_modules/@angular/compiler-cli/src/ngtools_impl.js:101:26) 在 Object.listLazyRoutesOfModule (/Users/ip/Sites/SmartShoeApp/angular-src/node_modules/@angular/compiler-cli/src/ngtools_impl.js:52:22) 在 Function.NgTools_InternalApi_NG_2.listLazyRoutes (/Users/ip/Sites/SmartShoeApp/angular-src/node_modules/@angular/compiler-cli/src/ngtools_api.js:78:39) 在 AotPlugin._getLazyRoutesFromNgtools (/Users/ip/Sites/SmartShoeApp/angular-src/node_modules/@ngtools/webpack/src/plugin.js:241:66) 在 _donePromise.Promise.resolve.then.then.then.then.then (/Users/ip/Sites/SmartShoeApp/angular-src/node_modules/@ngtools/webpack/src/plugin.js:495:24) 在 在 process._tickCallback (internal/process/next_tick.js:188:7)
操作系统: mac OS 高山脉
package.json:
{ "name": "meanauthapp",
“版本”:“1.0.0”,
"description": "意思是栈应用",
"main": "app.js",
“脚本”:{ "test": "echo \"错误:没有指定测试\" && exit 1",
"start": "node app"
},
“依赖”:{ “快递”:“*”,
"mongoose": "*",
"bcryptjs": "*",
"cors": "*",
"jsonwebtoken": "*",
"body-parser": "*",
"passport": "*",
"passport-jwt": "*"
},
“作者”:“ip”,
“许可证”:“ISC”,
“devDependencies”:{
"@angular/cli": "^1.5.5"
} }
【问题讨论】: