You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
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