angular-slider / ngx-slider

Self-contained, mobile friendly slider component for Angular based on angularjs-slider
https://angular-slider.github.io/ngx-slider/
MIT License
390 stars 175 forks source link

Not compatible Ivy compiler #327

Closed nen155 closed 10 months ago

nen155 commented 2 years ago

Angular version: 14.0.4 angular.json { "projects": { "my-existing-project": { "architect": {

        "build": {
           "options": {
              ...
              "aot": true,
           }
        }
     }
  }

} } tsconfig.app.json { ... "angularCompilerOptions": { "enableIvy": true }

Cannot use this module not compatible with Ivy compiller.

If you remove ivy compiler from tsconfig and angular.json works, but before you must to remove node_modules folder and after you need to do npm install.

mokipedia commented 2 years ago

If you are using angular 14, ivy is already the default, no need to add "enabeIvy" in compiler options. Also, ngcc will convert this module to ivy and this works well. So if ngcc compiling breaks for you, the problem probably is in your settings.

that being said, it would be nice to see this project updated to ivy native in the future ^^

pumano commented 2 years ago

looks like ng-packagr 3.0.0 it's very old.

Lib project should be updated to latest version of ng-packagr and angular and add "compileMode": "partial" to lib's tsconfig instead of "enableIvy": true

narendrasinghrathore commented 2 years ago

'NgxSliderModule' does not appear to be an NgModule class.

This likely means that the library (@angular-slider/ngx-slider) which declares NgxSliderModule has not been processed correctly by ngcc, or is not compatible with Angular Ivy. Check if a newer version of the library is available, and update if so. Also consider checking with the library's authors to see if the library is expected to be compatible with Ivy.

sovushka-utrom commented 2 years ago

I get the same message as @narendrasinghrathore

narendrasinghrathore commented 2 years ago

⠹ Generating browser application bundles (phase: setup)...Processing legacy "View Engine" libraries:

thanhlt90 commented 2 years ago

Hi, I got the same issue with @narendrasinghrathore . Any solution to resolve it with new Angular Ivy version, please ?

pumano commented 2 years ago

@thanhlt90 only possible way is not use this library, because this library is abandoned

narendrasinghrathore commented 2 years ago

Hi, I got the same issue with @narendrasinghrathore . Any solution to resolve it with new Angular Ivy version, please ?

@thanhlt90 try to rebuild or do npm install again after adding library, maybe it will resolve.

thanhlt90 commented 2 years ago

Hi, I got the same issue with @narendrasinghrathore . Any solution to resolve it with new Angular Ivy version, please ?

@thanhlt90 try to rebuild or do npm install again after adding library, maybe it will resolve.

Yeah! It's working for me when try to rebuild with ngcc. Thanks @narendrasinghrathore!

danisss9 commented 1 year ago

check #296

whyboris commented 1 year ago

Looking at #296 - there is an alternative:

https://github.com/danisss9/ngx-slider 🤝 https://www.npmjs.com/package/ngx-slider-v2

Same as this repository, but install with npm install --save ngx-slider-v2 and then change the import to:

import { NgxSliderModule } from 'ngx-slider-v2';
poriakahrizi commented 1 year ago

first npm install --save @angular-slider/ngx-slider and this not work and has error but npm install --save ngx-slider-v2 this work thank for this npm install --save ngx-slider-v2

poriakahrizi commented 1 year ago

If you encounter CUSTOM_ELEMENTS_SCHEMA error in the module you use this package schemas: [ CUSTOM_ELEMENTS_SCHEMA , NO_ERRORS_SCHEMA] Add after the declarations

piotrdz commented 10 months ago

Closing old issues on the topic of upgrades. Please follow discussion in more recent issues regarding this subject (#351, #355).