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

provide option to use pnpm for installation to avoid file replication across apps. #7898

Open
laurencefass opened this issue Oct 29, 2019 · 6 comments

Comments

@laurencefass
Copy link

Is your proposal related to a problem?

using create-react-app uses for installation leads to lots of repeated node_module folders

angular cli provides option to use npm or pnpm for installation.

Describe the solution you'd like

give an option during create-react-app process to use pnpm if installed to avoid duplication of node_module files.

Describe alternatives you've considered

pnpm install on a github clone (havent tried it yet).

Additional context

none considered.

@heyimalex
Copy link
Contributor

We could add a --use-pnpm flag like we have a --use-npm flag, but I wonder if you couldn't just use pnpx create-react-app <whatever>? They use create-react-app as their example command so I assume it works, but maybe not?

@laurencefass
Copy link
Author

laurencefass commented Oct 30, 2019

i tried that and it doesn't work apparently because CRA using npm. I reported it on pnpm queue and maintainer replied hence i opened this issue here. pnpm/pnpm#2107 (comment)

@heyimalex
Copy link
Contributor

Then yeah, probably the best way forward would be to add an option like --use-pnpm and maybe to detect when we're being invoked via pnpx.

@laurencefass
Copy link
Author

laurencefass commented Oct 30, 2019

that would be very useful indeed as node_modules folders are consuming my hard drive! do you know when such a feature would be included into CRA if its accepted?

@TurboLion
Copy link

Related PR: #7791

@beenotung
Copy link

beenotung commented May 21, 2021

I made an alternative npm init react-ts-template script that can work with any package managers.
git npm

Instead of running a chain of scripts (create-react-app is doing this currently),
we can just copy the template files into the new folder (using degit or just fs.copyFile)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants