添加链接
link管理
链接快照平台
  • 输入网页链接,自动生成快照
  • 标签化管理网页链接
相关文章推荐
想出家的萝卜  ·  中国新闻网·  4 月前    · 
愤怒的伤痕  ·  Is it possible to ...·  6 月前    · 
没有腹肌的鞭炮  ·  北京大学·  1 年前    · 
刚毅的皮带  ·  No converter found ...·  1 年前    · 

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement . We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account This expression is not constructable. Type 'typeof import("/sandbox/node_modules/qr-code-styling/lib/index")' has no construct signatures.ts(2351) This expression is not constructable. Type 'typeof import("/sandbox/node_modules/qr-code-styling/lib/index")' has no construct signatures.ts(2351) afunworm opened this issue Oct 26, 2021 · 3 comments

I am not able to make this work in Angular. Here is your example: https://codesandbox.io/s/agitated-panini-tpgb2?file=/src/app/app.component.ts

As you can see, there is an error in the example code where it says new QRCodeStyling() as QRCodeStyling is not constructable.

I have tried changing import * as QRCodeStyling from "qr-code-styling"; to import QRCodeStyling from "qr-code-styling"; but it still doesn't work.

I'm using Angular 12.2.3.

Please advise.

Try this.
Inside your project's tsconfig.json add the following to the "compilerOptions" node
"esModuleInterop":true