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

Investigate using npm out of the box over yarn #532

Closed
jwoertink opened this issue Jul 2, 2020 · 8 comments
Closed

Investigate using npm out of the box over yarn #532

jwoertink opened this issue Jul 2, 2020 · 8 comments
Labels
needs investigation A possible bug / better docs needed. Investigate further

Comments

@jwoertink
Copy link
Member

Related: https://gitter.im/luckyframework/Lobby?at=5efe584eb8152d34847a9694
Related: #346

I'm not great when it comes to the whole node ecosystem, but I'm under the impression that node bundles with npm by default, but to use yarn, you need to run an extra install step. In some cases, people using nvm to manage their node versions might install yarn through brew, and node through nvm. In the case above, he wasn't able run ./script/setup since it failed every time running yarn dev. But using npm and npx both worked fine.

Me personally, I like yarn's output, and interface better; however, it might make things easier on us to just default to npm, and then allow the user to switch to yarn.

Does anyone have any experience where npm was default, and it didn't work, but using yarn did?

I guess alternatively, we could add some docs saying "if this doesn't work, try using npm"...

@jwoertink jwoertink added the needs investigation A possible bug / better docs needed. Investigate further label Jul 2, 2020
@paulcsmith
Copy link
Member

I think we should remove yarn. NPM is a lot better now, and removing a required dependency would be a great for the getting started experience I think

@stephendolan
Copy link
Member

I haven't used NPM in ages, but I'd be down for this change to simplify the setup process.

@jwoertink
Copy link
Member Author

The frontend ecosystem is a bit out of my wheel house... I'm doing to go with npm, but do we need to look in to using npx in our package.json file or is that tool only for specific cases? I know it's more implementation details, but I'd like to have everything out there so we all know the direction and such.

Also, on the topic of tossing everything out there, I think we also need to consider people that installed node / npm a long time ago and haven't updated in a while. Using older versions might break things when running a new setup. What's the best way we can determine the oldest version we could support, and how do we do a check that you have that version installed before doing anything?

@hovsater
Copy link
Contributor

hovsater commented Jul 19, 2021

I've done a lot of frontend in the past year, and I haven't had any issues with npm. As @paulcsmith said, it was different story before, but today I think it's a safe bet.

I'd say, go for it! 👍

@jwoertink
Copy link
Member Author

I'm moving a Lucky app over to npm to test it out. So far it looks like we can't disable the progress indicator
Ref: npm/cli#3314

This isn't a totally huge issue if you're familiar with Lucky; however, imagine the point of someone brand new to Lucky running ./script/setup, and then they get a massive wall of npm WARN

Screen Shot 2021-08-06 at 2 52 24 PM

It looks like they have these .npmrc files we could generate with new apps and have some default settings, but I'm not sure which all settings we would want, and of those which work.

I'll keep an eye on that issue though.

@jwoertink
Copy link
Member Author

Alright, I've spent the last 30+min trying to get one of my apps to run on npm, and I can't get it to "bundle". I'm running in to issue after issue that doesn't seem to exist when using yarn.

vuejs/component-compiler-utils#82 (comment)

My vote is to keep yarn as the default until after 1.0 unless someone else wants to give it a shot... 🤷‍♂️

@jwoertink
Copy link
Member Author

https://freddixx.medium.com/hello-yarn-2-goodbye-node-modules-21d97afc1a75

Looks like yarn 2 may be pretty amazing.

@paulcsmith
Copy link
Member

Thanks for investigating @jwoertink! Let's closet his and re-open in the future. Sounds like yarn is still worth having over npm 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs investigation A possible bug / better docs needed. Investigate further
Projects
None yet
Development

No branches or pull requests

4 participants