Git Product home page Git Product logo

Comments (19)

divmgl avatar divmgl commented on September 26, 2024 2

(or add a new flag, I don't know which is better)

I think adding a flag makes more sense here since we're having these issues in cases where the pnpm options are not under our control.

Regardless, I believe I found a way to get our .pnpmfile.cjs file into the Render build. We have a monorepo and Render only uses a subset of our monorepo, so we're thinking about fixing this by moving our .pnpmfile.cjs to our package (which is called packages/app) and then doing a symlink from the root of our repo to the file in our package:

❯ ln -s packages/app/.pnpmfile.cjs .pnpmfile.cjs

That will allow us to both use pnpm i locally and pnpm i in Render without having to customize the pnpm options. So hopefully it will work. We're testing it now.

The next issue will come when we have more than one frontend package deployed on Render, as we'll then need to duplicate .pnpmfile.cjs in every package.

from pnpm.

zkochan avatar zkochan commented on September 26, 2024 1

overrides cannot remove dependencies.

I think in this scenario it would be OK to ignore the missing pnpmfile.

from pnpm.

zkochan avatar zkochan commented on September 26, 2024 1

I think that should be fine

from pnpm.

zkochan avatar zkochan commented on September 26, 2024

@KSXGitHub could the checksum of the .pnpmfile.cjs differ in different envs?

from pnpm.

zkochan avatar zkochan commented on September 26, 2024

@divmgl do you have the same .pnpmfile.cjs file both locally (when you create the lockfile) and in the docker, when you run pnpm install --frozen-lockfile?

from pnpm.

divmgl avatar divmgl commented on September 26, 2024

@zkochan checking now

from pnpm.

zkochan avatar zkochan commented on September 26, 2024

I guess if git changes the line endings, the checksum could differ

from pnpm.

divmgl avatar divmgl commented on September 26, 2024

!!!!! @zkochan we did not! that fixed it! thanks a million

from pnpm.

KSXGitHub avatar KSXGitHub commented on September 26, 2024

could the checksum of the .pnpmfile.cjs differ in different envs?

I don't think it could. And CRLFs are normalized into LFs by the hash function so it should be a problem either. But I don't remember the hash function trimming new lines, so if pnpmfile final newlines were trimmed, it could cause hash difference.

from pnpm.

KSXGitHub avatar KSXGitHub commented on September 26, 2024

we did not! that fixed it! thanks a million

Oh, it was because the pnpmfiles were different?

from pnpm.

divmgl avatar divmgl commented on September 26, 2024

Quick observation though: while this does fix things locally, this will break Render.com builds because the .pnpmfile.cjs file is not included.

@KSXGitHub yep, we had a custom .pnpmfile.cjs file that was not included in our Docker images.

from pnpm.

zkochan avatar zkochan commented on September 26, 2024

Maybe we could ignore the pnpmfileChecksum check if --frozen-lockfile is used and .pnpmfile.cjs is not present.

(or add a new flag, I don't know which is better)

from pnpm.

zkochan avatar zkochan commented on September 26, 2024

(or add a new flag, I don't know which is better)

I think adding a flag makes more sense here since we're having these issues in cases where the pnpm options are not under our control.

If the options are not under your control then how do you expect to use the said flag?

from pnpm.

divmgl avatar divmgl commented on September 26, 2024

If the options are not under your control then how do you expect to use the said flag?

Ah, that's true :(. We're having a different issue now we're the .pnpmfile.cjs is not being picked up by GHA, so we're looking into that now lol

from pnpm.

divmgl avatar divmgl commented on September 26, 2024

We're thinking about just removing our .pnpmfile.cjs file at this point. It exists to avoid installing Webpack (as we have dependencies that are using Webpack for some reason) but it's causing more headaches for us.

from pnpm.

KSXGitHub avatar KSXGitHub commented on September 26, 2024

It exists to avoid installing Webpack (as we have dependencies that are using Webpack for some reason) but it's causing more headaches for us.

Can you use overrides? Many of pnpmfile use cases can be replaced with pnpm.overrides.

from pnpm.

KSXGitHub avatar KSXGitHub commented on September 26, 2024

If webpack was an optional dependencies then there's ignoredOptionalDependencies.

from pnpm.

zkochan avatar zkochan commented on September 26, 2024

We could add a way to remove other types of dependencies using settings. It was already requested once.

from pnpm.

KSXGitHub avatar KSXGitHub commented on September 26, 2024

We could add a way to remove other types of dependencies using settings. It was already requested once.

Can and should it be integrated to overrides? For example: "webpack": "-" means removing webpack.

from pnpm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.