node_modules/angular2-qrscanner/angular2-qrscanner.d.ts,找到版本



我们收到阻碍部署的元数据错误。因为它不允许ng生成。以下是配置;然后是完整的错误跟踪。

ERROR in Error: Metadata version mismatch for module <Angular4.3-AppPath>/node_modules/angular2-qrscanner/angular2-qrscanner.d.ts, found version 4, expected 3, resolving symbol <Module_Name>in <Angular4.3-AppPath>/src/app/modules/manage/device/device.module.ts, resolving symbol <Module_Name>in <Angular4.3-AppPath>/src/app/<Module_Path>.ts
at syntaxError (<Angular4.3-AppPath>node_modules@angularcompilerbundlescompiler.umd.js:1725:34)
at simplifyInContext (<Angular4.3-AppPath>node_modules@angularcompilerbundlescompiler.umd.js:24953:23)
at StaticReflector.simplify (<Angular4.3-AppPath>node_modules@angularcompilerbundlescompiler.umd.js:24965:13)
at StaticReflector.annotations (<Angular4.3-AppPath>node_modules@angularcompilerbundlescompiler.umd.js:24395:41)
at _getNgModuleMetadata (<Angular4.3-AppPath>node_modules@angularcompiler-clisrcngtools_impl.js:138:31)
at _extractLazyRoutesFromStaticModule (<Angular4.3-AppPath>node_modules@angularcompiler-clisrcngtools_impl.js:109:26)
at <Angular4.3-AppPath>node_modules@angularcompiler-clisrcngtools_impl.js:129:27
at Array.reduce ()
at _extractLazyRoutesFromStaticModule (<Angular4.3-AppPath>node_modules@angularcompiler-clisrcngtools_impl.js:128:10)
at Object.listLazyRoutesOfModule (<Angular4.3-AppPath>node_modules@angularcompiler-clisrcngtools_impl.js:53:22)
at Function.NgTools_InternalApi_NG_2.listLazyRoutes (<Angular4.3-AppPath>node_modules@angularcompiler-clisrcngtools_api.js:91:39)
at AotPlugin._getLazyRoutesFromNgtools (<Angular4.3-AppPath>node_modules@ngtoolswebpacksrcplugin.js:241:66)
at _donePromise.Promise.resolve.then.then.then.then.then (<Angular4.3-AppPath>node_modules@ngtoolswebpacksrcplugin.js:495:24)
at
at process._tickCallback (internal/process/next_tick.js:188:7)

webpack:编译失败。

设置:angular2qrscanner版本:1.0.7 Angular CLI:1.5.0节点:8.10.0 OS:win32 x64 Angular:4.3.2…common,compiler,compiler-CLI,core,forms,http。。。平台浏览器、平台浏览器动态,router@angular/animations:4.4.0-RC.0@angular/cdk:2.0.0-beta.10@angular/kli:1.5.0@angular/flex布局:2.0.0-beta.8@angular/材料:2.0.0-beta.10@angular devkit/构建优化器:0.0.33@angular devkit/core:0.0.20@angular devkit/示意图:0.0.35@ngtools/json架构:1.1.0@ngtools/webpack:1.8.0@示意图/angular:0.1.3类型脚本:2.6.1 webpack:3.8.1

在localhost:4200中解析。已将包弃用为angular2-qrscanner@0.1.7.它起作用了!!

然而,在作为Azure WebApp托管时,相机拒绝加载。它在Chrome控制台上给出如下错误消息:-

拒绝从'blob:/5c07044f-447c-45a9-979e-458d5e955f8f'加载媒体,因为它违反了以下内容安全策略指令:"默认src'unsafe-inline'数据:https:"。请注意,没有显式设置"media-src",因此使用"default-src"作为回退。

正在处理的解决方案:-Edge和IE没有给出此错误。相机打开但不扫描。我应该切换到另一个二维码扫描仪还是继续使用"angular2二维码扫描仪"。我也在考虑同样的问题。

最新更新