【问题标题】:Metadata version mismatch for module... angular-flash-messages, any solution for this模块的元数据版本不匹配... angular-flash-messages,任何解决方案
【发布时间】: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"

} }

【问题讨论】:

    标签: angularjs flash-message


    【解决方案1】:

    我今天在我的 angular4 应用程序上解决了这个问题。 我在 package.json 中设置了 1.0.8 版本,它现在对我有用:

    "angular2-flash-messages": "1.0.8"
    

    【讨论】:

      【解决方案2】:

      在 package.json 文件中使用 "angular2-flash-messages": "^1.0.5"。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2018-05-05
        • 1970-01-01
        • 2018-05-28
        • 1970-01-01
        • 2018-06-26
        • 2018-05-06
        相关资源
        最近更新 更多