typescript - Upgrading to Angular 19: Error TS2304 - Cannot Find Name 'QRCodeModule' - Stack Overflow

Today, I upgraded to Angular 19, and I'm encountering an issue that I can't resolve."I

Today, I upgraded to Angular 19, and I'm encountering an issue that I can't resolve.

"I installed version angularx-qrcode: "^19.0.0", and I'm getting an error message that I don't understand...

error TS2304: Cannot find name 'QRCodeModule'.
QRCodeModule,

I'll share all the relevant files with you.

@NgModule({
  imports: [
    QRCodeModule,
  ],
 
})

I thank you for your help and the time you dedicated to my problem.

Today, I upgraded to Angular 19, and I'm encountering an issue that I can't resolve.

"I installed version angularx-qrcode: "^19.0.0", and I'm getting an error message that I don't understand...

error TS2304: Cannot find name 'QRCodeModule'.
QRCodeModule,

I'll share all the relevant files with you.

@NgModule({
  imports: [
    QRCodeModule,
  ],
 
})

I thank you for your help and the time you dedicated to my problem.

Share Improve this question edited Mar 5 at 13:25 MarinaLaGrande asked Mar 3 at 19:22 MarinaLaGrandeMarinaLaGrande 3032 gold badges3 silver badges7 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 1

As per the docs/changelog, QRCodeModule was dropped in 19.0 and replaced by the standalone QRCodeComponent

So instead of importing the module you should import

import { QRCodeComponent } from 'angularx-qrcode';

@NgModule({
  imports: [
    // ...
    QRCodeComponent,
  ],
  // ...
})

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745075848a4609830.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信