我运行ionic-serve一切都很好
但运行 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,问题仍然存在
我认为您的
TypeScript
版本与库使用的 TypeScript
版本不匹配。库中的版本是"typescript": "~3.8.3"
。 package.json 中的 TypeScript
版本是什么?如果低于此值,您将必须升级 Ionic
以获得更新版本的 TypeScript
。
你好!我不懂英语,但我用西班牙语留下了它们。
deben ir a la carpeta @nodemodules。啊,buscar la carpeta @techiediaries luego entrar ngx-qrcode,y en la carpeta bin。在“导入”部分中导入 qrcode.component.d.ts 并将其导入为 import { NgxQrcodeElementTypes } from './qrcode.types'; deben agregar estas 2 mas : 从'./qrcode.types'导入{NgxQrcodeVersionType}; 从 './qrcode.types' 导入 { NgxQrcodeErrorCorrectionLevels };
después en laparte de las de "export recognize" deben cambiar esto 版本: import("./qrcode.types").NgxQrcodeVersionType;波埃斯托 版本:NgxQrcodeVersionType;
罗米莫帕拉 //errorCorrectionLevel: import("./qrcode.types").NgxQrcodeErrorCorrectionLevels; 罗雷姆普拉赞波 错误校正级别:NgxQrcodeErrorCorrectionLevels; y funcionara!