Generator-jhipster: Add support to npm 7.

Created on 14 Oct 2020  路  12Comments  路  Source: jhipster/generator-jhipster

Overview of the issue

JHipster fails with NPM 7 due to peerDependencies.

Motivation for or Use Case

NPM 7 was released and we should keep compatibility with latest stable version.

NPM 7 installs and verifies peer dependencies by default, this feature reduces execution/runtime conflicts between dependencies.

Reproduce the error

npm i -g [email protected]

jhipster --defaults
jhipster --defaults --client-framework react
jhipster --defaults --client-framework vue

Related issues

Suggest a Fix

Resolve peer conflicts.

  • If not possible execute npm with --force or --legacy-peer-deps.

Workaround:

  • generate with --skip-install
  • install with npm install --legacy-peer-deps
  • update maven/gradle with --legacy-peer-deps
JHipster Version(s)

JHipster configuration

Every.

Entity configuration(s) entityName.json files generated in the .jhipster directory

Browsers and Operating System

  • [ ] Checking this box is mandatory (this is just to show you read everything)

$$ bug-bounty $$ $200 area

All 12 comments

@pascalgrimaud @vishal423 eslint-config-jhipster has peer dependencies problems.
I am wondering if it's worth to keep as a package instead of a shared file?

I'm in favor of a shared file, if it's possible

@pascalgrimaud ng-jhipster is the missing part for angular. Can you do a release?

I was really busy today, with my day work. I'll try to do a release tomorrow

The purpose of eslint-config-jhipster package was to provide shared configurations for generated applications (not for maintainability in the generator itself). In most enterprises, you typically want to follow certain design guidelines and would like each project to align with that. Those shared configurations were extensible, which means you can override those to create new or even override in the individual project itself.

Since we have already merged code to remove this package, I would suggest archiving that package repository as well to indicate that we wouldn't be maintaining this package going forth.

Thanks for the information @vishal423
I archived https://github.com/jhipster/eslint-config-jhipster
It will be easier for us, as it was not maintained since more than 1 year

Thanks @pascalgrimaud

I'm having this issue as NPM 7 got installed by default on my machine - I believe many users will have this issue, so it's very important.
I'm adding a bug bounty here.

I think we cannot support both npm 6.x and npm 7.x.

  • maven/graddle uses a local installed npm version.
  • webpack scripts uses a global one.

There will be some conflicts if we support both.

  • package-lock not is guaranteed to be backwards compatible
  • I found some some errors that if project is generated with npm7, npm6 maven script fails to find one of the dependencies.

There are 2 options:

  • Support npm 6 only
  • Support npm 7 only:
    Switch everything to npm7, including ours package-lock.

This issue is stale because it has been open 30 days with no activity.
Our core developers tend to be more verbose on denying. If there is no negative comment, possibly this feature will be accepted.
We are accepting PRs :smiley:.
Comment or this will be closed in 7 days

@github-actions please keep open

Was this page helpful?
0 / 5 - 0 ratings

Related issues

frantzynicolas picture frantzynicolas  路  3Comments

chegola picture chegola  路  4Comments

kaidohallik picture kaidohallik  路  3Comments

shivroy121 picture shivroy121  路  3Comments

RizziCR picture RizziCR  路  3Comments