Adding lockfiles to examples
See original GitHub issueexamples/*
doesn’t have lockfiles right now as they’re part of the monorepo- this might make the vercel deployment randomly fail if someone publishes a bad build of the 10^100 sub-deps of next (as shown yesterday in https://github.com/trpc/trpc/pull/91#issuecomment-781434382)
- would be nice if they had lockfiles but not sure how to make it happen in the yarn workspace
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (7 by maintainers)
Top Results From Across the Web
What is package lock json? Lockfiles for yarn & npm ... - Snyk
Lock files are introduced when developers interact with a project, such as adding a dependency or installing dependencies for a pristine project ...
Read more >The Ultimate Guide to yarn.lock Lockfiles - Andrew Hansen
For example, you can set your registry to the default npm registry by adding the following line in a .yarnrc file in the...
Read more >Understanding Lockfiles | Shalvah's Blog
On future installs, it uses this lock file to fetch dependencies, ensuring that those exact versions are installed. For example, here's a ...
Read more >Multiple lockfiles in Python repos - Pantsbuild Blog
Pants 2.10 added initial support for multiple lockfiles, which was improved in the recently released Pants 2.11. Try out our example-python ...
Read more >When Not to Use Lock Files with Node.js - Twilio
In this blog post we cover a use case where you do not want to use lock files and instead add them to...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Feel free to work at this. Seems like @QuiiBz has a good idea how to solve it, we can try that
Not sure if it’s also a problem here, but I’ve had issues with trying to detach the examples when using react in my monorepos. Since the
@trpc
packages depend on React as a dev dependency, it is installed innode_modules
and webpack may resolve react from there. But it is also installed as a peer dependency and webpack also bundles that. Since you can’t have two versions of react, that will break it. Related issue I made for pnpm: https://github.com/pnpm/pnpm/discussions/3833. Also yarn won’t be able to link the example packages to the actual@trpc
packages in the monorepo automatically. We’ll have to use a special specifier likefile:
. If the examples are workspaces, then yarn can dedupe react by hoisting it to a sharednode_modules
so webpack only resolves one instance of it.