0

I'm using "@angular/core": "^16.2.0", "typescript": "5.1.6", and "ng-jhipster": "0.16.0" in my Angular project. When trying to run the project, I encounter the following error:

app.main.ts:14 Error: Unexpected value 'NgJhipsterModule' imported by the module 'TechAppModule'. Please add an @NgModule annotation.
...

Here's the relevant part of my app.module.ts:

import { JhiEventManager, NgJhipsterModule } from 'ng-jhipster';

...

@NgModule({
    imports: [
...
        NgJhipsterModule.forRoot({
            alertAsToast: false,
            i18nEnabled: true,
            defaultI18nLang: 'en'
        }),
...
    ],
    declarations: [
...
    ],
    providers: [
        ...,
        DialogService,
        {
            provide: NgbDateParserFormatter,
            useClass: NgbDateCustomParserFormatter
        }
    ],
    exports: [...],
    bootstrap: [JhiMainComponent]
})
export class TechAppModule {}

Has anyone faced a similar issue or can guide me on how to resolve this? I suspect there might be some incompatibility or a missing configuration.

2 Answers 2

2

ng-jhipster has been merged into the generator-jhipster.

As you can see the repo is now read only since 2021.

You should probably take a look at their demo app.

0

As far as I can see, this library is outdated and it also has outdated dependencies. The last publish was 3 years ago, which I highly suspect it is not compatible with angular 16.

1

Your Answer

Reminder: Answers generated by Artificial Intelligence tools are not allowed on Stack Overflow. Learn more

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.