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

[feat] pnpm #3193

Closed
Decodetalkers opened this issue Jan 10, 2022 · 9 comments
Closed

[feat] pnpm #3193

Decodetalkers opened this issue Jan 10, 2022 · 9 comments

Comments

@Decodetalkers
Copy link

Describe the problem

when use create-tauri-app
pnpm create tauri-app, It use npm to install depencence

Describe the solution you'd like

I hope it will use pnpm

Alternatives considered

No response

Additional context

No response

@lucasfernog
Copy link
Member

You can use pnpm using the --manager CLI option, e.g. yarn create tauri-app --manager pnpm.

@Decodetalkers
Copy link
Author

You can use pnpm using the --manager CLI option, e.g. yarn create tauri-app --manager pnpm.

pnpm create tauri-app
When I use this command, can it be default pnpm?

@amrbashir
Copy link
Member

amrbashir commented Jan 10, 2022

pnpm create tauri-app
When I use this command, can it be default pnpm?

Next release of create-tauri-app will auto detect the package manager by checking an env var set by the package manager, but there is a bug in pnpm itself where it doesn't set that env var when using pnpm create.

For now and until pnpm fixes the bug, it is recommended to use --manager or -m flag

@vhscom
Copy link

vhscom commented Feb 10, 2022

Curious if there's a ticket PNPM is using to track that bug. On a related note there's some discussion about using PNPM as a version manager for Node.js so that seems potentially related so I'll drop the link here for those looking to optimze DX around tooling integration: pnpm/pnpm#3434

@amrbashir
Copy link
Member

here is the relevant pnpm issue pnpm/pnpm#3985

@vhscom
Copy link

vhscom commented Feb 11, 2022

believe the blocking pnpm issue was just fixed. hopefully that means the env var will be available soon in pnpm. is there a good place to request an enhancement to drop the need for -m flag for scaffolding with pnpm? i'll start poking around a little. ☺️

EDIT: it appears as if this gh tooling integration workflow might be a good entrypoint assuming i found a good spot for the work and a tdd workflow is desirable. not totally sure though i'm new to tauri. https://github.com/tauri-apps/tauri/blob/dev/.github/workflows/test-cta.yml

@amrbashir
Copy link
Member

@vhscom yeah it is fixed in pnpm so users that use recent pnpm version will have the fix automatically, no need for more configuration or removal of -m flag.

By default, it will recognize the used package manager and can be overridden by --manager or -m flag.

@vhscom
Copy link

vhscom commented Feb 11, 2022

By default, it will recognize the used package manager and can be overridden by --manager or -m flag.

It's a small but nice user affordance. And I appreciate it as PNPM is becoming my goto package manager for post-React apps built with Svelte. Thank you.

@FabianLars
Copy link
Member

Yeah, many team members (myself included) are using pnpm as their main package manager already too!

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

5 participants