RobSchilderr / nextjs-native-starter

One Next.js codebase for iOS, Android and Web using Capacitor, TailwindCSS and authentication with Supertokens, written in Typescript
https://nextjs-native.com
166 stars 15 forks source link

Add pnpm #7

Open OliverGeneser opened 11 months ago

OliverGeneser commented 11 months ago

Maybe pnpm would be a good addition to npm, yarn and bun :smiley:

RobSchilderr commented 10 months ago

Thank you for your suggestion! Contributions are also welcome if you'd like to help with this enhancement. I am having issues already with people having different versions of yarn causing crashes.

OliverGeneser commented 10 months ago

@RobSchilderr If you add a pnpm branch I will make a PR with the changes :smile:

RobSchilderr commented 10 months ago

@RobSchilderr If you add a pnpm branch I will make a PR with the changes 😄

Hey I added a pnpm branch! I think once it's done we can switch to pnpm for real and drop yarn.

OliverGeneser commented 10 months ago

@RobSchilderr If you add a pnpm branch I will make a PR with the changes 😄

Hey I added a pnpm branch! I think once it's done we can switch to pnpm for real and drop yarn.

I have created a initial PR where I have tested the web app

RobSchilderr commented 10 months ago

@RobSchilderr If you add a pnpm branch I will make a PR with the changes 😄

Hey I added a pnpm branch! I think once it's done we can switch to pnpm for real and drop yarn.

I have created a initial PR where I have tested the web app

I hope to make time to check the native app sometime this week.

RobSchilderr commented 10 months ago

Hi @OliverGeneser ,

We're encountering an issue with integrating PNPM as a package manager. The initial CLI installation relies on Supertokens, which currently doesn't support PNPM. Our standard process is to use npx create-supertokens-app@latest --manager=yarn for initializing new repositories.

When attempting to use PNPM, we encounter the following error:

Error: Invalid package manager provided, valid values:
    - npm
    - yarn
    - bun

Error: If you think this is an issue with the tool, please report this at https://github.com/supertokens/create-supertokens-app/issues

To address this, we have a few options:

  1. Develop our own CLI that supports multiple package managers.
  2. Request Supertokens to add PNPM support.
  3. Maintain the current PNPM branch, allowing interested users to clone from there and clearly state this in the README.md.

For now I think option #3 is the best as I don't have the time to make our own CLI. If someone does, we can of course consider this.

OliverGeneser commented 10 months ago

@RobSchilderr As far as I can see they only clone this repo and print a link to the repo. So I don't think the --manager has any effect when choosing the Capacitor template. So we could probably add a note in the README and just state that this Repo uses PNPM and they should just use npx create-supertokens-app@latest :smile:

RobSchilderr commented 10 months ago

@RobSchilderr As far as I can see they only clone this repo and print a link to the repo. So I don't think the --manager has any effect when choosing the Capacitor template. So we could probably add a note in the README and just state that this Repo uses PNPM and they should just use npx create-supertokens-app@latest :smile:

I merged the PNPM branch to main!