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

Add support to npm 7. #12747

Closed
1 task
mshima opened this issue Oct 14, 2020 · 14 comments · Fixed by #13060
Closed
1 task

Add support to npm 7. #12747

mshima opened this issue Oct 14, 2020 · 14 comments · Fixed by #13060
Labels
area: enhancement 🔧 $$ bug-bounty $$ https://www.jhipster.tech/bug-bounties/ $200 https://www.jhipster.tech/bug-bounties/
Milestone

Comments

@mshima
Copy link
Member

mshima commented Oct 14, 2020

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)
@mshima
Copy link
Member Author

mshima commented Oct 15, 2020

@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?

@pascalgrimaud
Copy link
Member

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

@mshima
Copy link
Member Author

mshima commented Oct 16, 2020

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

@pascalgrimaud
Copy link
Member

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

@vishal423
Copy link
Contributor

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.

@pascalgrimaud
Copy link
Member

pascalgrimaud commented Oct 18, 2020

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

@pascalgrimaud
Copy link
Member

@mshima : release of ng-jhipster done

@mshima
Copy link
Member Author

mshima commented Oct 18, 2020

Thanks @pascalgrimaud

@jdubois
Copy link
Member

jdubois commented Nov 13, 2020

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.

@jdubois jdubois added $$ bug-bounty $$ https://www.jhipster.tech/bug-bounties/ $200 https://www.jhipster.tech/bug-bounties/ labels Nov 13, 2020
@mshima
Copy link
Member Author

mshima commented Nov 13, 2020

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 was referenced Nov 16, 2020
@github-actions
Copy link
Contributor

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 😃.
Comment or this will be closed in 7 days

@jdubois
Copy link
Member

jdubois commented Dec 14, 2020

@github-actions please keep open

@github-actions
Copy link
Contributor

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 😃.
Comment or this will be closed in 7 days

@pascalgrimaud
Copy link
Member

PR is already here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: enhancement 🔧 $$ bug-bounty $$ https://www.jhipster.tech/bug-bounties/ $200 https://www.jhipster.tech/bug-bounties/
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants