Ionic '=' expected @techiediaries/ngx-qrcode/lib/qrcode.component.d.ts,line:9

k4ymrczo  于 2023-09-28  发布在  Ionic
关注(0)|答案(1)|浏览(110)

我运行离子-服务一切都好
但是运行ionic cordova build android --release

我收到以下内容

[13:53:01]  typescript: ...LL/Desktop/full/node_modules/@techiediaries/ngx-qrcode/lib/qrcode.component.d.ts, line: 9 
                '=' expected. 
    
           L8:  value: string;
           L9:  version: import("./qrcode.types").NgxQrcodeVersionType;
          L10:  errorCorrectionLevel: import("./qrcode.types").NgxQrcodeErrorCorrectionLevels;
    
    [13:53:01]  typescript: ...LL/Desktop/full/node_modules/@techiediaries/ngx-qrcode/lib/qrcode.component.d.ts, line: 10 
                '=' expected.
    
           L9:  version: import("./qrcode.types").NgxQrcodeVersionType;
          L10:  errorCorrectionLevel: import("./qrcode.types").NgxQrcodeErrorCorrectionLevels;
          L11:  margin: number;

我安装了**@techiediaries/ngx-qrcode**,问题仍然存在

nqwrtyyt

nqwrtyyt1#

我认为您的TypeScript版本和库使用的TypeScript版本不匹配。库中的版本是"typescript": "~3.8.3"。您的package.json中的TypeScript版本是什么?如果低于此值,则必须升级Ionic以获得更新版本的TypeScript

相关问题