Giter Site home page Giter Site logo

Angular 9: Compile error about core HOT 15 OPEN

ngx-prism avatar ngx-prism commented on July 30, 2024 4
Angular 9: Compile error

from core.

Comments (15)

nlitterat avatar nlitterat commented on July 30, 2024 6

I found a solution at least for my case
I added

{
  "scripts": {
    "postinstall": "ngcc"
  }
}

and the problem was gone
This is needed when you are using the new Ivy compiler
I hope this will help

from core.

fahadjabbar8 avatar fahadjabbar8 commented on July 30, 2024 3

Any update on this i am getting this error for ngcc ?

from core.

jonnyrocks avatar jonnyrocks commented on July 30, 2024 1

A workaround is to disable Ivy compiler in Angular 9.
put below in tsconfig.json

  "angularCompilerOptions": {
    "enableIvy": false,
  }

from core.

joshijimit avatar joshijimit commented on July 30, 2024 1

Yeah, that works but the main reason to upgrade to Angular 9 would be to use Ivy compiler. So disabling it just for this component isn't a good idea. I have used ngx-highlightjs instead. It is not as cool as ngx-prism but does the job.

from core.

Trojaner avatar Trojaner commented on July 30, 2024 1

Same issue here, looks like lib is dead

from core.

joshijimit avatar joshijimit commented on July 30, 2024

Hi Hau,

I am also facing same issue. Looks like this package is no longer maintained by the authors. So either we need to find the alternate or try to upgrade it to support Angular 9 ourselves.

Will let you know if I find any luck. Please update me if you get around it too.

Thanks.

from core.

SergeyKatugin avatar SergeyKatugin commented on July 30, 2024

having same problem. I think its angular problem(ivy)

from core.

nas90 avatar nas90 commented on July 30, 2024

I'm also having the same issue, running on Angular 9 with Ivy enabled

from core.

nlitterat avatar nlitterat commented on July 30, 2024

Same here

from core.

ndesimone avatar ndesimone commented on July 30, 2024
{
  "scripts": {
    "postinstall": "ngcc"
  }
}

The internet wins. Thank you @nlitterat, this worked perfectly for me.

from core.

jairmilanes avatar jairmilanes commented on July 30, 2024

Not sure why but I get the following error while running ngcc:

Warning: Invalid constructor parameter decorator in G:/APPS/avalon/ama-code-editor-frontend/node_modules/@ngx-prism/core/dist/prism.service.js:
 () => [
    { type: DomSanitizer, },
]
Error: Error on worker #2: Error: getInternalNameOfClass() called on a non-ES5 class: expected PrismService to have an inner class declaration

🤷 Tried removing node_modules and doing a clean install but still, once ngcc runs that error comes up.

from core.

TNascimento43 avatar TNascimento43 commented on July 30, 2024

Erro será resolvido consultando o seguinte link conforme a versão do Angular: https://github.com/ngx-translate/core

from core.

maximus1989 avatar maximus1989 commented on July 30, 2024

"postinstall": "ngcc" fix problem but not work in IE: Invalid character in function getColors.
Any ideas?

from core.

elmota avatar elmota commented on July 30, 2024

"postinstall": "ngcc"

where do you type that?

from core.

maximus1989 avatar maximus1989 commented on July 30, 2024

"postinstall": "ngcc"

where do you type that?

Package.json -> scripts

from core.

Related Issues (9)

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.