Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

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

Cannot use NgsRevealModule Module in Angular 16 #155

Open
turboaux opened this issue Jun 27, 2023 · 2 comments
Open

Cannot use NgsRevealModule Module in Angular 16 #155

turboaux opened this issue Jun 27, 2023 · 2 comments

Comments

@turboaux
Copy link

turboaux commented Jun 27, 2023

Bug Report or Feature Request (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request

OS and Version?

Versions

MacOS Big Sur 11.6

Angular CLI: 16.1.1
Node: 18.13.0
Package Manager: npm 8.19.3
OS: darwin x64

Angular: 16.1.2
... animations, common, compiler, compiler-cli, core, forms
... platform-browser, platform-browser-dynamic, router

Package Version

@angular-devkit/architect 0.1601.1
@angular-devkit/build-angular 16.1.1
@angular-devkit/core 16.1.1
@angular-devkit/schematics 16.1.1
@angular/cli 16.1.1
@schematics/angular 16.1.1
rxjs 7.8.1
typescript 5.1.3

Repro steps

  • npm install --save scrollreveal
  • npm install --save ngx-scrollreveal
  • In angular.json add this line
    "scripts": [
    "node_modules/scrollreveal/dist/scrollreveal.js"
    ]
  • Add in your feature Module.
    import { NgsRevealModule } from 'ngx-scrollreveal';
    ...
    imports: [NgsRevealModule]

Run the app:

  • ng serve

The log given by the failure

Error: src/app/app.module.ts:15:5 - error NG6002: 'NgsRevealModule' does not appear to be an NgModule class.

NgsRevealModule,
   ~~~~~~~~~~~~~~~

node_modules/ngx-scrollreveal/ngs-reveal.module.d.ts:6:22

export declare class NgsRevealModule {
                       ~~~~~~~~~~~~~~~
This likely means that the library (ngx-scrollreveal) which declares NgsRevealModule 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.

From Angular 15 I get this when compiling.

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

  • ngx-scrollreveal [es2015/esm2015] (git://github.com/tinesoft/ngx-scrollreveal.git)
    Encourage the library authors to publish an Ivy distribution.
@turboaux turboaux changed the title Cannot use NgsRevealModule Module in Angular 16.1.0 Cannot use NgsRevealModule Module in Angular 16 Jun 27, 2023
@niamat-bakhshi
Copy link

As per the documentation, it shoud work for Angular 6+. However, it doesn't. My Angular is 17. It throws exactly the same error.

@XSiya
Copy link

XSiya commented Feb 6, 2024

@turboaux @niamat-bakhshi anyone know what the complexity is with supporting Ivy so we can push a PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants