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

fix: fail if no lockfile found #26

Merged
merged 1 commit into from
Jun 11, 2024
Merged

fix: fail if no lockfile found #26

merged 1 commit into from
Jun 11, 2024

Conversation

dbarrosop
Copy link
Member

No description provided.

@dbarrosop dbarrosop merged commit 10f1b79 into main Jun 11, 2024
1 check passed
@ajgassner
Copy link

ajgassner commented Aug 20, 2024

@dbarrosop I have a menorepo setup with pnpm workspaces and turborepo. The nhost sub-project is in a subfolder <root>/backend/functions. I just have a single lock file in the project root. Any suggestions without ugly workarounds?

First approach:
I have applied following in the root package.json:

  "devDependencies": {
    ....
    "@pnpm/make-dedicated-lockfile": "0.6.15"
  },
  "scripts": {
    ....
    "lock-create": "cd backend/functions && pnpm make-dedicated-lockfile"
  }

However this works locally but not in nhost cloud.

Second approach:
Symlinking also does not help. It seems nhost cloud is working fine with a monorepo/workspace setup.

Third approach / my current solution wich works locally and in the cloud:

  1. Create an empty pnpm-lock.yaml in backend/functions
  2. Start local nhost nhost up -> pnpm-lock.yaml gets populated

Note: When I make a dependency change in package.json I also have to nhost up again to get a fresh lockfile for the cloud which uses pnpm install --frozen-lockfile. So in addition the dependencies "serverless-http": "3.0.2", "express": "4.18.1" are required to be in package.json.

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

Successfully merging this pull request may close these issues.

3 participants