Closed avdev4j closed 4 years ago
@avdev4j
Will there be a way to migrate from yarn to npm?
For the moment, no. But indeed this is an issue we need to fix. Do you have any idea?
@avdev4j
i do not.
I inquired because i am in progress on an app that uses yarn for package management. Always have trouble with npm.
Sad to see yarn support go.
From doing some research this may help?
https://stackoverflow.com/questions/51239726/react-native-switch-from-yarn-to-npm
According to your link, this is what I'm think:
Remove yarn.lock (don't need this file).
Coule be done by JHipster during the V7 migration.
Remove folder node_modules
Is it really necessary ? Otherwise could also be done by JHipster (need to confirm that).
In package.json, change script use yarn to the same command with npm
package.json will be automatically updated by the v7 generation. We just need to be sure that in the .yo-rc.json "yarn" will be updated to "npm".
To sum up, I would say that we need to remove one file, update .yo-rc.json and package.json files.
We should wright a migration documentation to explain that in details.
We notice that Yarn is not use as NPM could be. We added Yarn because it offered more advanced features than NPM in time. Nowadays, NPM has catch up and it's easier for the team to maintain only one package manager.
I've just done some tests:
jhipster --yarn
jhipster --force
Conclusion: After migrating to the version that no longer support Yarn, npm is automatically called. Everything seems to ran fine, only yarn.lock and yarn-error.log have not been removed. I think that JHipster should not remove those files and we should let the user to take this responsability.
@RDsideNow If you want to provide help on this issue, I suggest you to do the same on your project (and revert after ofc).
yarn link
yarn link generator-jhipster
jhipster
(you could add the--force
option to force overwriting)@avdev4j I feel sad and a little disappointed to know that yarn will no longer be part of jhipster. IMHO I prefer to use yarn above npm. I notice that yarn is much faster than npm and I have verified it using fast internet and slow internet
@yuniel-acosta : we didn't remove Yarn yet. It is still in discussion. I'm the one who added Yarn support in the past, and I suggest to remove the support in v7.
The reason is to have less options to maintain. Few months ago, I had daily builds with Yarn which failed during 1 month. No one see it and I was lazy to fix it because I don't use Yarn.
For me, we have too much options in JHipster, so if we want to support other options in future, we need to remove the less used.
About Yarn, I'm waiting statistics from Julien. So let's discuss
I know it is a lot of work and effort to keep all these technologies together, but from my point of view the large number of options that jhipster offers is one of its greatest advantages. I know that few of us use yarn as a package manager, but it is my favorite as is vuejs, vuetify (maybe in the future I will try to add vuetify as a blueprint), postgres, neo4j and kotlin. The good and beautiful thing about jhipster is the ease of integrating different technologies to create something amazing. I just hope you consider keeping this option or creating a module or blueprint for use yarn.
We do have the data in our database, but we have no reports set up to analyse this, so it's very complicated for me to get this. That's something we should do for v7: export that data (which is anonymized anyway), and use some kind of reporting tool for analyzing different options (not just Yarn) in order to remove the ones nobody use
Closing this, thanks again @avdev4j!
Removing yarn as a generator option was not practical, as many of developers prefer yarn instead npm.
I understand @micobarac But the problem was no one wanted to maintain it. So as I was the one who added Yarn support, I'd prefer to remove this option instead of letting something unmaintained
Feel free to take the lead on this support:
Overview of the feature request
According to the v7 Roadmap https://github.com/jhipster/generator-jhipster/issues/10958 I suggest to remove totally the Yarn Support in JHipster.
Motivation for or Use Case
As NPM do the job as expected, IMHO, we should remove Yarn as ClientPackageManager and reduce the amount of options. Less options would let us more time to focus on valuable ones.
Related issues or PR
A PR is already available here https://github.com/jhipster/generator-jhipster/pull/12134