Replies: 1 comment
-
|
Well for the docker dev issue I found a simple solution. Yarn link all packages at once Then on next container start if symlinks are orphaned, unlink them all at once by package name |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'd love some advice on using Yarn 4's
yarn link.Context
Got a handful of nextjs frontend apps and a couple npm packages
90% of the time we can work on them individually (some folks native & some local docker dev)
Every now and then it's helpful to
yarn linkthe npm packages.We have scripts that automate orchestration for docker devs
With Yarn 1 we could run
yarn linkand it would work smoothly.Now with Yarn 4 the
package.jsonand theyarn.lockfiles are affected byyarn linkand this has added some friction.Native Dev
With native developmentn
package.jsonandyarn.lockfiles are modified and not commit them to the git repoDocker Dev
With docker development it's even more difficult
yarn linkanything that shows up in there (it's nice)But when I bring down the containers and run them without the external volumes (don't want to yarn link)
yarn unlinkany symlinks that don't have an associated external volume / dist folderyarn unlinkfails because the symlink doesn't point to anything anymoreSo how do I make this easy
yarn installpackage.jsonandyarn.lockfile that have modificationspackage.jsonandyarn.lock, but that seems a bit heavy handedRequest for advice
Do native devs just have to deal with the modified committable files?
Is there a better way to do docker dev (we can't do a mono-repo)
could
yarn unlinkbe a bit more flexible and just undo anything that it can instead of insisting on the symlink pointing to files?Beta Was this translation helpful? Give feedback.
All reactions