Giter VIP home page Giter VIP logo

Comments (9)

softsimon avatar softsimon commented on August 16, 2024 1

I went through and upgraded the whole library to support 9+ without changing any API that I remember.
The library is renamed and replaced to get rid of the "angular-2" tag..

So yes, you need to swap the import completely and then rename the component to:
<ngx-bootrap-multiselect ...

from ngx-bootstrap-multiselect.

softsimon avatar softsimon commented on August 16, 2024 1

I haven't tried 9.x but I believe it should work.
That error message seems very general and is not pointing specifically to the library.

Could you try the suggested solutions here like

  • Setting "enableIvy":false
  • Erasing node_modules and run npm install again

https://stackoverflow.com/questions/61222467/angular-9-ngcc-fails-with-an-unhandled-exception

from ngx-bootstrap-multiselect.

kylebradshaw avatar kylebradshaw commented on August 16, 2024

that is super awesome. thanks dude. I will make this change and double check

from ngx-bootstrap-multiselect.

kylebradshaw avatar kylebradshaw commented on August 16, 2024

So after an update I did run into issues on my 9.1.12 project - here is the error log.

[error] Error: NGCC failed.
    at NgccProcessor.process (C:\Users\$USER\Development\RemoteLinkCloud\Abiomed.ImpellaConnect\ClientApp\node_modules\@ngtools\webpack\src\ngcc_processor.js:76:19)
    at C:\Users\$USER\Development\RemoteLinkCloud\Abiomed.ImpellaConnect\ClientApp\node_modules\@ngtools\webpack\src\angular_compiler_plugin.js:579:31
    at SyncHook.eval [as call] (eval at create (C:\Users\$USER\Development\RemoteLinkCloud\Abiomed.ImpellaConnect\ClientApp\node_modules\tapable\lib\HookCodeFactory.js:19:10), <anonymous>:7:1)
    at SyncHook.lazyCompileHook (C:\Users\$USER\Development\RemoteLinkCloud\Abiomed.ImpellaConnect\ClientApp\node_modules\tapable\lib\Hook.js:154:20)
    at Object.webpack [as webpackFactory] (C:\Users\$USER\Development\RemoteLinkCloud\Abiomed.ImpellaConnect\ClientApp\node_modules\webpack\lib\webpack.js:55:30)
    at createWebpack (C:\Users\$USER\Development\RemoteLinkCloud\Abiomed.ImpellaConnect\ClientApp\node_modules\@angular-devkit\build-webpack\src\webpack\index.js:19:36)
    at Object.runWebpack (C:\Users\$USER\Development\RemoteLinkCloud\Abiomed.ImpellaConnect\ClientApp\node_modules\@angular-devkit\build-webpack\src\webpack\index.js:33:12)
    at SwitchMapSubscriber.project (C:\Users\$USER\Development\RemoteLinkCloud\Abiomed.ImpellaConnect\ClientApp\node_modules\@angular-devkit\build-angular\src\browser\index.js:130:32)
    at SwitchMapSubscriber._next (C:\Users\$USER\Development\RemoteLinkCloud\Abiomed.ImpellaConnect\ClientApp\node_modules\@angular-devkit\build-angular\node_modules\rxjs\internal\operators\switchMap.js:49:27)
    at SwitchMapSubscriber.Subscriber.next (C:\Users\$USER\Development\RemoteLinkCloud\Abiomed.ImpellaConnect\ClientApp\node_modules\@angular-devkit\build-angular\node_modules\rxjs\internal\Subscriber.js:66:18)
    at C:\Users\$USER\Development\RemoteLinkCloud\Abiomed.ImpellaConnect\ClientApp\node_modules\@angular-devkit\build-angular\node_modules\rxjs\internal\util\subscribeToPromise.js:7:24

is this related to the peer dependency requirement of min 10.0.6? so 9.x+ is not currently supported?
https://github.com/softsimon/ngx-bootrap-multiselect/blob/41f1e032ce609336a4d047c478f3424bc77c1e1b/package.json#L15

from ngx-bootstrap-multiselect.

kylebradshaw avatar kylebradshaw commented on August 16, 2024

I went through and tried some things. The "enableIvy": false flag did let me compile successfully, but this particular project requires IE11 support and has i18n features, so some of that changed with Ivy which is detailed here if you don't compile https://angular.io/guide/ivy#opting-out-of-ivy-in-version-9 (so I would like to enable Ivy for this reason)

I created a base NG@9 app with only the ngx-bootrap-multiselect package installed. In case you want to see a live example. In tsconfig target: es5 is needed to support IE11 and that causes the compilation issue on build. Changing to target: es2015 compiles fine, but then again the IE support is required.

I wonder what changed from angular2-multiselect to the current iteration that would cause these issues. LMK if you are aware of a simple fix!

https://github.com/kylebradshaw/bootrap-multiselect

Thanks a ton.

from ngx-bootstrap-multiselect.

softsimon avatar softsimon commented on August 16, 2024

Ok, it seems the error is caused by compiling to es2015 which IE11 does not have.
And compiling to es5 cause the build error:
Error on worker #1: Error: getInternalNameOfClass() called on a non-ES5 class

What changed in the updated component is probably dropping es5 support.
Did you see this article linked from the Stackoverflow post on this error?
https://medium.com/angular-in-depth/angular-and-internet-explorer-a6e4b5a5dae1

from ngx-bootstrap-multiselect.

softsimon avatar softsimon commented on August 16, 2024

@kylebradshaw were you able to find a solution?

from ngx-bootstrap-multiselect.

kylebradshaw avatar kylebradshaw commented on August 16, 2024

Unfortunately I could never get the new library to compile to es5 so I had to rollback to angular2-multiselect for now. Still need to support ie11 on this project

from ngx-bootstrap-multiselect.

kylebradshaw avatar kylebradshaw commented on August 16, 2024

Something to be aware of in lib maybe worth documenting In the readme?

from ngx-bootstrap-multiselect.

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.