apptension / saas-boilerplate

SaaS Boilerplate - Open Source and free SaaS stack that lets you build SaaS products faster in React, Django and AWS. Focus on essential business logic instead of coding repeatable features!
https://apptension.com/saas-boilerplate
MIT License
2.13k stars 234 forks source link

CLI Starter Kit Fails on Clean Install with ERR_PNPM_FROZEN_LOCKFILE_WITH_OUTDATED_LOCKFILE #537

Closed Hamzehn closed 4 months ago

Hamzehn commented 4 months ago

Describe the bug

Trying to install for the first time on WSL2 (Windows 11) with the following environment:

After I fill out the environment variables in the beginning, the installation quickly fails with the following error:

ERR_PNPM_FROZEN_LOCKFILE_WITH_OUTDATED_LOCKFILE  Cannot perform a frozen installation because the version of the lockfile is incompatible with this version of pnpm

Try either:
1. Aligning the version of pnpm that generated the lockfile with the version that installs from it, or
2. Migrating the lockfile so that it is compatible with the newer version of pnpm, or
3. Using "pnpm install --no-frozen-lockfile".
Installing dependencies... !
    Error: Command failed: pnpm i --frozen-lockfile

Steps to reproduce

1- I made sure I have the following installed on my machine (WSL2 running on Windows)

2- I created a directory [dir]

mkdir [dir]

3- I ran pnpm create-saas-boilerplate ./[dir]

pnpm create-saas-boilerplate ./[dir]

System Info

System:
    OS: Linux 5.15 Ubuntu 20.04.1 LTS (Focal Fossa)
    CPU: (8) x64 Intel(R) Core(TM) i7-10510U CPU @ 1.80GHz
    Memory: 3.29 GB / 7.64 GB
    Container: Yes
    Shell: 5.0.17 - /bin/bash
  Binaries:
    Node: 18.20.2 - ~/.nvm/versions/node/v18.20.2/bin/node
    npm: 10.5.0 - ~/.nvm/versions/node/v18.20.2/bin/npm
    pnpm: 9.0.6 - ~/.nvm/versions/node/v18.20.2/bin/pnpm

Logs

Click to expand! ```shell ------ Notice ------ This CLI collects various anonymous events, warnings, and errors to improve the CLI tool and enhance your user experience. Read more: https://docs.demo.saas.apptoku.com/working-with-sb/dev-tools/telemetry If you want to opt out of telemetry, you can set the environment variable SB_TELEMETRY_DISABLED to 1 in your shell. For example: export SB_TELEMETRY_DISABLED=1 Performing system check: ✔ Checking if docker is installed... it is! ✔ Checking if pnpm is installed... it is! Project will be initialized in directory: /home/[***]/[***] Fetching latest release... done Latest release: 2.6.0 Downloading project... done Setup environment variables: This step will set up all environment variables. For more details visit: https://docs.demo.saas.apptoku.com/api-reference/env. Pass PROJECT_NAME [saas]: saas Configure you social OAuth clients (optional): Pass SOCIAL_AUTH_GOOGLE_OAUTH2_KEY []: Pass SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET []: Pass SOCIAL_AUTH_FACEBOOK_KEY []: Pass SOCIAL_AUTH_FACEBOOK_SECRET []: Configure Stripe access (optional): Pass STRIPE_LIVE_SECRET_KEY []: Pass STRIPE_TEST_SECRET_KEY []: Pass DJSTRIPE_WEBHOOK_SECRET []: Pass STRIPE_PUBLISHABLE_KEY []: Configure Contentful access (optional): Pass CONTENTFUL_SPACE_ID []: Pass CONTENTFUL_ACCESS_TOKEN []: Pass CONTENTFUL_ENVIRONMENT []: Installing dependencies... packages/webapp |  WARN  The field "pnpm" was found in /home/[***]/[***]/packages/webapp/package.json. This will not take effect. You should configure "pnpm" at the root of the workspace instead. Scope: all 22 workspace projects  ERR_PNPM_FROZEN_LOCKFILE_WITH_OUTDATED_LOCKFILE  Cannot perform a frozen installation because the version of the lockfile is incompatible with this version of pnpm Try either: 1. Aligning the version of pnpm that generated the lockfile with the version that installs from it, or 2. Migrating the lockfile so that it is compatible with the newer version of pnpm, or 3. Using "pnpm install --no-frozen-lockfile". Installing dependencies... ! Error: Command failed: pnpm i --frozen-lockfile ```

Validations

mkleszcz commented 4 months ago

Thanks for creating this issue! It looks like there might be a problem with backward compatibility of the pnpm 9+. Current lock file is generated via pnpm v8. Will check this

kun391 commented 4 months ago

I had the same issue when I used the pnpm version 7.20.0, but resolved with pnpm version 8.15.7