GithubHelp home page GithubHelp logo

Comments (17)

Cordobo avatar Cordobo commented on May 18, 2024 6

Ok, what I've read so far, it could be an issue with an older @angular dependency (1) used in your package.json. I run ng build --prod with the following devDependencies and can't reproduce the error. Coiuld you try updating your dependencies to the ones below?

"devDependencies": {
    "@angular-devkit/build-angular": "~0.803.21",
    "@angular-devkit/build-ng-packagr": "~0.803.21",
    "@angular/cli": "~8.3.21",
    "@angular/compiler-cli": "~8.2.14",
    "@angular/language-service": "~8.2.14",
...
}
  1. Reference: angular/angular-cli#15705

from angularx-qrcode.

lance-h avatar lance-h commented on May 18, 2024 4

@nicosoutn2014 I am using @angular/cli ^7.2.2 - I downgraded angularx-qrcode to ^1.6.4 which removed the issue for me. Be aware that the documentation is slightly different between versions.

from angularx-qrcode.

maelle9931 avatar maelle9931 commented on May 18, 2024 3

The fix proposed on this thread only works for Angular 8+. This component is supposed to be compatible with Angular 7. Please provide a fix for Angular 7.

from angularx-qrcode.

andreElrico avatar andreElrico commented on May 18, 2024 3

I called

  • npm update (update to latest minor)
  • npm install @angular-devkit/[email protected]
  • ng build --prod (works now)

Thanks to all other suggestions. Very helpful :-)

from angularx-qrcode.

PTC-JoshuaMatthews avatar PTC-JoshuaMatthews commented on May 18, 2024 1

@andreElrico my issue was with a different library but it was throwing the same error, and the steps above got it working. Thanks!

from angularx-qrcode.

Cordobo avatar Cordobo commented on May 18, 2024

@egodefroy Thanks for your bug report, could you please provide a working repo with which I can reproduce the issue?

compare #67

from angularx-qrcode.

albalooshi avatar albalooshi commented on May 18, 2024

Hi, having the same issue with an ionic app, when running --prod.

from angularx-qrcode.

egodefroy avatar egodefroy commented on May 18, 2024

@Cordobo
see my repo : https://github.com/egodefroy/tstqr

from angularx-qrcode.

albalooshi avatar albalooshi commented on May 18, 2024

solved the issue by downgrading to 1.6.4

from angularx-qrcode.

Cordobo avatar Cordobo commented on May 18, 2024

@Cordobo
see my repo : https://github.com/egodefroy/tstqr

I can't access the repo, I got a 404

from angularx-qrcode.

egodefroy avatar egodefroy commented on May 18, 2024

@Cordobo
Thanks, this seems the right analysis. Using these dependencies, the error does not show!

from angularx-qrcode.

Cordobo avatar Cordobo commented on May 18, 2024

Ok, closing. Feel free to highlight my comment for other users with a smilie.

from angularx-qrcode.

nicosoutn2014 avatar nicosoutn2014 commented on May 18, 2024

@Cordobo Hi! What about @angular/cli ~7.3.5? Any fixes?

from angularx-qrcode.

Dianaman avatar Dianaman commented on May 18, 2024

Got the same error and fixed it by downgrading the version, as stated above.
Please, try making the latest version compatible with the newest versions of angular in order to not lose functionalities.

from angularx-qrcode.

Shaker1978 avatar Shaker1978 commented on May 18, 2024

The fix proposed on this thread only works for Angular 8+. This component is supposed to be compatible with Angular 7. Please provide a fix for Angular 7.

I agree. Version 2.x is declared to work with Angular 6/7/8/9 which is incorrect, because you have to use @angular-devkit/build-angular 0.8xx in order to build prod without errors. This again requires Angular 8. This finally leaves version 2.x unusable with Angular 6+7 in a prod environment.

from angularx-qrcode.

bacmanni avatar bacmanni commented on May 18, 2024

The fix proposed on this thread only works for Angular 8+. This component is supposed to be compatible with Angular 7. Please provide a fix for Angular 7.

I agree. Version 2.x is declared to work with Angular 6/7/8/9 which is incorrect, because you have to use @angular-devkit/build-angular 0.8xx in order to build prod without errors. This again requires Angular 8. This finally leaves version 2.x unusable with Angular 6+7 in a prod environment.

You are right. Just got my code working and found this thread after wondering why my production build is broken. Page still says that 2.x is compatible with Angular 7.x but this is incorrect. @Cordobo please give us working fix or correct the documentation.

from angularx-qrcode.

Cordobo avatar Cordobo commented on May 18, 2024

Hi @ALL

I updated the readme to reflect the issue.

from angularx-qrcode.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.